以下は私のgradleブルドです -
allprojects {
group = "org.coderearth"
version = "0.1.SNAPSHOT"
ext {
springBootVersion = "1.4.3.RELEASE"
}
}
project(":core") {
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile 'org.slf4j:jcl-over-slf4j:1.7.21'
compile 'ch.qos.logback:logback-classic:1.1.7'
testCompile 'junit:junit:4.12'
}
}
project.ext {
recipeModules = subprojects.findAll {
it.name.startsWith('recipe') || it.name == "service"
}
}
configure(project.ext.recipeModules) {
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
repositories {
mavenCentral()
}
}
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile project(":core")
}
}
subprojects {
task info {
doLast {
println "========================================================="
println "\t project.group = $project.group"
println "\t project.name = $project.name"
println "\t project.parent = $project.parent.name"
println "\t project.version = $project.version"
println "========================================================="
}
}
}
サービス/build.gradle
apply plugin: 'org.springframework.boot'
dependencies {
compile("org.springframework.boot:spring-boot-starter")
}
// bootRepackage.enabled = false
タスクの実行中にビルド警告が 1 つ表示されbuild
ます。
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:service:compileJava UP-TO-DATE
:service:processResources UP-TO-DATE
:service:classes UP-TO-DATE
:service:findMainClass
:service:jar UP-TO-DATE
:service:bootRepackage
The ProjectDependency.getProjectConfiguration() method has been deprecated and is scheduled to be removed in Gradle 4.0.
ModuleDependency.getConfiguration() has been deprecated and is scheduled to be removed in Gradle 4.0. Use ModuleDependency.getTargetConfiguration() instead.
:service:assemble
:service:compileTestJava UP-TO-DATE
:service:processTestResources UP-TO-DATE
:service:testClasses UP-TO-DATE
:service:test UP-TO-DATE
:service:check UP-TO-DATE
:service:build
BUILD SUCCESSFUL
Total time: 0.973 secs
奇妙なことに、service/build.gradle で bootRepackage を無効にすると、消えてしまいます。単なる警告ですが、何が欠けているのか知りたいです。springboot の gradle プラグインが使用するものは非推奨になっていると思いますが、それが私のビルドに含まれている場合は、修正する必要があります。
前もって感謝します、/kp