Skip to content

Commit

Permalink
[BUILD][DOC] (picocli-spring-boot-starter) stay up-to-date with recen…
Browse files Browse the repository at this point in the history
…t Spring 3 versions
  • Loading branch information
remkop committed Aug 26, 2023
1 parent 96fb7cc commit e83d867
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 34 deletions.
57 changes: 27 additions & 30 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// This file works around dependabot issue https:/dependabot/dependabot-core/issues/1618
// See https://www.sameerkulkarni.de/posts/dependabot-with-gradle/

// Spring Boot 3.0 requires Java 17 as a minimum version
boolean useSpring3 = JavaVersion.current().majorVersion.compareTo("17") >= 0;
logger.quiet("dependencies.gradle: JavaVersion=${JavaVersion.current()}")
logger.quiet("dependencies.gradle: JavaVersion.majorVersion=${JavaVersion.current().majorVersion}")
logger.quiet("dependencies.gradle: useSpring3=${useSpring3}")

ext {
// PICOCLI VERSION

Expand All @@ -31,35 +25,38 @@ ext {
junitDepVersion = "4.11"
junitVersion = "4.13.2"
log4j2Version = "2.20.0"
springBootVersion = useSpring3 ? "3.1.2" : "2.7.11" // Spring Boot 3.0 requires Java 17 as a minimum version
springBootVersion = "3.1.2" // Spring Boot 3.0 requires Java 17 as a minimum version
systemRulesVersion = "1.19.0"
systemLambdaVersion = '1.2.1'
junit5Version = '5.9.3'

supportDependencies = [
junit : "junit:junit:$junitVersion",
junit5Api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
junit5Engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
systemLambda : "com.github.stefanbirkner:system-lambda:$systemLambdaVersion",
hamcrestCore : "org.hamcrest:hamcrest-core:$hamcrestCoreVersion",
jansi : "org.fusesource.jansi:jansi:$jansiVersion",
groovy : "org.codehaus.groovy:groovy-all:$groovyVersion",
systemRules : "com.github.stefanbirkner:system-rules:$systemRulesVersion",
junitParams : "pl.pragmatists:JUnitParams:1.1.1",
springbootstarter : "org.springframework.boot:spring-boot-starter:$springBootVersion",
springbootannproc : "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion",
springboottest : "org.springframework.boot:spring-boot-starter-test:$springBootVersion",
jline3 : "org.jline:jline:$jline3Version",
jline2 : "jline:jline:$jline2Version",
ivy : "org.apache.ivy:ivy:$ivyVersion",
compileTesting : "com.google.testing.compile:compile-testing:$compileTestingVersion",
log4j2api : "org.apache.logging.log4j:log4j-api:$log4j2Version",
log4j2core : "org.apache.logging.log4j:log4j-core:$log4j2Version",
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib",
scala_lang : "org.scala-lang:scala-library:2.13.10",
validation_api : "jakarta.validation:jakarta.validation-api:3.0.2",
//el_api : "jakarta.el:jakarta.el-api:3.0.3",
el_impl : "org.glassfish:jakarta.el:4.0.2",
junit : "junit:junit:$junitVersion",
junit5Api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
junit5Engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
systemLambda : "com.github.stefanbirkner:system-lambda:$systemLambdaVersion",
hamcrestCore : "org.hamcrest:hamcrest-core:$hamcrestCoreVersion",
jansi : "org.fusesource.jansi:jansi:$jansiVersion",
groovy : "org.codehaus.groovy:groovy-all:$groovyVersion",
systemRules : "com.github.stefanbirkner:system-rules:$systemRulesVersion",
junitParams : "pl.pragmatists:JUnitParams:1.1.1",
springbootstarter : "org.springframework.boot:spring-boot-starter:$springBootVersion",
springbootannproc : "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion",
springboottest : "org.springframework.boot:spring-boot-starter-test:$springBootVersion",
springbootstarterOld : "org.springframework.boot:spring-boot-starter:2.7.11",
springbootannprocOld : "org.springframework.boot:spring-boot-configuration-processor:2.7.11",
springboottestOld : "org.springframework.boot:spring-boot-starter-test:2.7.11",
jline3 : "org.jline:jline:$jline3Version",
jline2 : "jline:jline:$jline2Version",
ivy : "org.apache.ivy:ivy:$ivyVersion",
compileTesting : "com.google.testing.compile:compile-testing:$compileTestingVersion",
log4j2api : "org.apache.logging.log4j:log4j-api:$log4j2Version",
log4j2core : "org.apache.logging.log4j:log4j-core:$log4j2Version",
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib",
scala_lang : "org.scala-lang:scala-library:2.13.10",
validation_api : "jakarta.validation:jakarta.validation-api:3.0.2",
//el_api : "jakarta.el:jakarta.el-api:3.0.3",
el_impl : "org.glassfish:jakarta.el:4.0.2",

hibernate_validator_annproc: "org.hibernate.validator:hibernate-validator-annotation-processor:8.0.0.Final",
hibernate_validator : "org.hibernate.validator:hibernate-validator:8.0.0.Final",
Expand Down
2 changes: 1 addition & 1 deletion picocli-spring-boot-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ command line applications with Spring and picocli.

## Dependency Management

Picocli 4.7.4 has been tested with Spring Boot 2.5, 2.6 and 2.7 up to 2.7.5.
Picocli 4.7.4 has been tested with Spring Boot 2.5, 2.6, 2.7, and 3.1 up to 3.1.2.

Add the following dependency:

Expand Down
20 changes: 17 additions & 3 deletions picocli-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,23 @@ if (useJava17) {

dependencies {
api rootProject
api supportDependencies.springbootstarter
annotationProcessor supportDependencies.springbootannproc
testImplementation supportDependencies.springboottest
if (useJava17) {
api supportDependencies.springbootstarter
annotationProcessor supportDependencies.springbootannproc
testImplementation supportDependencies.springboottest

logger.quiet("picocli-spring-boot-starter/build.gradle: api ${supportDependencies.springbootstarter}")
logger.quiet("picocli-spring-boot-starter/build.gradle: annotationProcessor ${supportDependencies.springbootannproc}")
logger.quiet("picocli-spring-boot-starter/build.gradle: testImplementation ${supportDependencies.springboottest}")
} else {
api supportDependencies.springbootstarterOld
annotationProcessor supportDependencies.springbootannprocOld
testImplementation supportDependencies.springboottestOld

logger.quiet("picocli-spring-boot-starter/build.gradle: api ${supportDependencies.springbootstarterOld}")
logger.quiet("picocli-spring-boot-starter/build.gradle: annotationProcessor ${supportDependencies.springbootannprocOld}")
logger.quiet("picocli-spring-boot-starter/build.gradle: testImplementation ${supportDependencies.springboottestOld}")
}
}

jar {
Expand Down

0 comments on commit e83d867

Please sign in to comment.