Upgrade to Gradle 7.4.2 and use java-library plugin
Align with main branch
This commit is contained in:
64
build.gradle
64
build.gradle
@@ -6,9 +6,9 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.3.0'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.3.0'
|
||||
id 'org.asciidoctor.jvm.convert' version '3.3.0'
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.3.2'
|
||||
id 'org.asciidoctor.jvm.convert' version '3.3.2'
|
||||
id 'de.undercouch.download' version '4.1.2'
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ ext {
|
||||
allprojects {
|
||||
group = "org.springframework.webflow"
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "java-library"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply plugin: "org.springframework.build.optional-dependencies"
|
||||
apply from: "${rootProject.projectDir}/ide.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"
|
||||
|
||||
@@ -267,7 +267,7 @@ configure(rootProject) {
|
||||
group = "Distribution"
|
||||
archiveBaseName = "spring-webflow"
|
||||
archiveClassifier = "docs"
|
||||
description = "Builds -${archiveClassifier} archive containing api and reference " +
|
||||
description = "Builds -${archiveClassifier.get()} archive containing api and reference " +
|
||||
"for deployment at static.springframework.org/spring-webflow/docs."
|
||||
|
||||
from (api) {
|
||||
@@ -292,9 +292,11 @@ configure(rootProject) {
|
||||
group = "Distribution"
|
||||
archiveBaseName = "spring-webflow"
|
||||
archiveClassifier = "schema"
|
||||
description = "Builds -${archiveClassifier} archive containing all " +
|
||||
description = "Builds -${archiveClassifier.get()} archive containing all " +
|
||||
"XSDs for deployment at static.springframework.org/schema."
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
subprojects.each { subproject ->
|
||||
Properties schemas = new Properties()
|
||||
|
||||
@@ -328,7 +330,7 @@ configure(rootProject) {
|
||||
group = "Distribution"
|
||||
archiveBaseName = "spring-webflow"
|
||||
archiveClassifier = "dist"
|
||||
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
|
||||
description = "Builds -${archiveClassifier.get()} archive, containing all jars and docs, " +
|
||||
"suitable for community download page."
|
||||
|
||||
def baseDir = "${archiveBaseName}-${project.version}"
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,55 +1,61 @@
|
||||
apply plugin: "maven"
|
||||
apply plugin: "maven-publish"
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
customizePom(pom, project)
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
if (project.name != 'spring-js-resources') {
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
}
|
||||
versionMapping {
|
||||
usage('java-api') {
|
||||
fromResolutionOf('compileClasspath')
|
||||
}
|
||||
usage('java-runtime') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
}
|
||||
pom {
|
||||
afterEvaluate {
|
||||
description = project.description
|
||||
name = project.description
|
||||
}
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
organization {
|
||||
name = "Spring IO"
|
||||
url = "https://spring.io/projects/spring-webflow"
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = "The Apache Software License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
connection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
developerConnection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "rstoyanchev"
|
||||
name = "Rossen Stoyanchev"
|
||||
email = "rstoyanchev@vmware.com"
|
||||
}
|
||||
}
|
||||
issueManagement {
|
||||
system = "Jira"
|
||||
url = "https://jira.spring.io/browse/SWF"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def customizePom(pom, gradleProject) {
|
||||
pom.whenConfigured { generatedPom ->
|
||||
// eliminate test-scoped dependencies (no need in maven central poms)
|
||||
generatedPom.dependencies.removeAll { dep ->
|
||||
dep.scope == "test"
|
||||
}
|
||||
|
||||
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||||
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
||||
"$dep.scope:$dep.groupId:$dep.artifactId"
|
||||
}
|
||||
|
||||
// add all items necessary for maven central publication
|
||||
generatedPom.project {
|
||||
name = gradleProject.description
|
||||
description = gradleProject.description
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
organization {
|
||||
name = "Spring IO"
|
||||
url = "https://spring.io/projects/spring-webflow"
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name "The Apache Software License, Version 2.0"
|
||||
url "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/spring-projects/spring-webflow"
|
||||
connection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
developerConnection = "scm:git:git://github.com/spring-projects/spring-webflow"
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "rstoyanchev"
|
||||
name = "Rossen Stoyanchev"
|
||||
email = "rstoyanchev@pivotal.io"
|
||||
}
|
||||
}
|
||||
issueManagement {
|
||||
system = "Jira"
|
||||
url = "https://jira.spring.io/browse/SWF"
|
||||
}
|
||||
}
|
||||
}
|
||||
// Disable generation of Gradle Module Metadata for compatibility
|
||||
// with older versions of Spring Web Flow.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
description = "Spring Binding"
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework:spring-context")
|
||||
implementation("org.springframework:spring-context")
|
||||
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.hamcrest:hamcrest")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testImplementation("org.hamcrest:hamcrest")
|
||||
testImplementation("org.easymock:easymock")
|
||||
testImplementation("org.apache.tomcat:tomcat-jasper-el")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-core")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
description = "Spring Faces"
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-binding"))
|
||||
compile(project(":spring-webflow"))
|
||||
compile("org.springframework:spring-web")
|
||||
compile("org.springframework:spring-webmvc")
|
||||
implementation(project(":spring-binding"))
|
||||
implementation(project(":spring-webflow"))
|
||||
implementation("org.springframework:spring-web")
|
||||
implementation("org.springframework:spring-webmvc")
|
||||
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
compileOnly("javax.servlet:javax.servlet-api")
|
||||
@@ -17,16 +17,16 @@ dependencies {
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
optional("org.springframework.security:spring-security-taglibs")
|
||||
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.myfaces.test:myfaces-test22")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testCompile("org.springframework:spring-test")
|
||||
testCompile("javax.servlet:javax.servlet-api")
|
||||
testCompile("com.sun.faces:jsf-api")
|
||||
testCompile("com.sun.faces:jsf-impl")
|
||||
testCompile("org.apache.myfaces.core:myfaces-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testImplementation("org.easymock:easymock")
|
||||
testImplementation("org.apache.myfaces.test:myfaces-test22")
|
||||
testImplementation("org.apache.tomcat:tomcat-jasper-el")
|
||||
testImplementation("org.springframework:spring-test")
|
||||
testImplementation("javax.servlet:javax.servlet-api")
|
||||
testImplementation("com.sun.faces:jsf-api")
|
||||
testImplementation("com.sun.faces:jsf-impl")
|
||||
testImplementation("org.apache.myfaces.core:myfaces-impl")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-core")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
description = "Spring Web Flow"
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-binding"))
|
||||
compile("org.springframework:spring-web")
|
||||
compile("org.springframework:spring-webmvc")
|
||||
api(project(":spring-binding"))
|
||||
implementation("org.springframework:spring-web")
|
||||
implementation("org.springframework:spring-webmvc")
|
||||
|
||||
compileOnly("javax.el:javax.el-api")
|
||||
compileOnly("javax.servlet:javax.servlet-api")
|
||||
@@ -20,21 +20,21 @@ dependencies {
|
||||
optional("org.apache.tiles:tiles-el")
|
||||
optional("org.apache.tiles:tiles-extras")
|
||||
|
||||
testCompile("junit:junit")
|
||||
testCompile("org.junit.jupiter:junit-jupiter")
|
||||
testCompile("org.easymock:easymock")
|
||||
testCompile("org.apache.tomcat:tomcat-jasper-el")
|
||||
testCompile("org.springframework:spring-aop")
|
||||
testCompile("org.springframework:spring-jdbc")
|
||||
testCompile("org.springframework:spring-test")
|
||||
testCompile("org.hibernate:hibernate-entitymanager")
|
||||
testCompile("org.hibernate:hibernate-validator")
|
||||
testCompile("org.hsqldb:hsqldb")
|
||||
testCompile("javax.servlet.jsp:javax.servlet.jsp-api")
|
||||
testCompile("javax.servlet:jstl")
|
||||
testCompile("javax.servlet:javax.servlet-api")
|
||||
testCompile("javax.validation:validation-api")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul")
|
||||
testImplementation("junit:junit")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testImplementation("org.easymock:easymock")
|
||||
testImplementation("org.apache.tomcat:tomcat-jasper-el")
|
||||
testImplementation("org.springframework:spring-aop")
|
||||
testImplementation("org.springframework:spring-jdbc")
|
||||
testImplementation("org.springframework:spring-test")
|
||||
testImplementation("org.hibernate:hibernate-entitymanager")
|
||||
testImplementation("org.hibernate:hibernate-validator")
|
||||
testImplementation("org.hsqldb:hsqldb")
|
||||
testImplementation("javax.servlet.jsp:javax.servlet.jsp-api")
|
||||
testImplementation("javax.servlet:jstl")
|
||||
testImplementation("javax.servlet:javax.servlet-api")
|
||||
testImplementation("javax.validation:validation-api")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-core")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
testRuntimeOnly("org.apache.logging.log4j:log4j-jul")
|
||||
}
|
||||
Reference in New Issue
Block a user