Adopt new Gradle maven-publish plugin
The maven plugin was removed in Gradle 7, so we need to replace it with maven-publish. This uses a similar DSL, but operates in a slightly different way. The simplest way of handling the differences is to reorder its application within build.gradle so that appropriate properties will have been applied by the time publish-maven.gradle is invoked.
This commit is contained in:
48
build.gradle
48
build.gradle
@@ -99,30 +99,6 @@ allprojects {
|
||||
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
|
||||
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
||||
|
||||
sourceCompatibility=1.8
|
||||
targetCompatibility=1.8
|
||||
|
||||
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
|
||||
|
||||
sourceSets.test.resources.srcDirs = ["src/main/java", "src/test/resources", "src/test/java"]
|
||||
|
||||
jar {
|
||||
manifest.attributes["Implementation-Title"] = subproject.name
|
||||
manifest.attributes["Implementation-Version"] = subproject.version
|
||||
|
||||
from("${rootProject.projectDir}/src/dist") {
|
||||
include "license.txt"
|
||||
include "notice.txt"
|
||||
into "META-INF"
|
||||
expand(copyright: new Date().format("yyyy"), version: project.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(javaProjects) { javaProject ->
|
||||
|
||||
test {
|
||||
@@ -154,6 +130,30 @@ configure(javaProjects) { javaProject ->
|
||||
}
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
|
||||
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
||||
|
||||
sourceCompatibility=1.8
|
||||
targetCompatibility=1.8
|
||||
|
||||
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
|
||||
|
||||
sourceSets.test.resources.srcDirs = ["src/main/java", "src/test/resources", "src/test/java"]
|
||||
|
||||
jar {
|
||||
manifest.attributes["Implementation-Title"] = subproject.name
|
||||
manifest.attributes["Implementation-Version"] = subproject.version
|
||||
|
||||
from("${rootProject.projectDir}/src/dist") {
|
||||
include "license.txt"
|
||||
include "notice.txt"
|
||||
into "META-INF"
|
||||
expand(copyright: new Date().format("yyyy"), version: project.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(rootProject) {
|
||||
description = "Spring Web Flow"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user