Skip to content

Commit

Permalink
tr(gradle): replace current version mgnt with Version Catalogs (#2604)
Browse files Browse the repository at this point in the history
  • Loading branch information
educhastenier authored Apr 4, 2024
1 parent 35fd714 commit 6a1e113
Show file tree
Hide file tree
Showing 52 changed files with 167 additions and 137 deletions.
2 changes: 1 addition & 1 deletion bonita-engine-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
api("org.springframework.boot:spring-boot-starter:${Deps.springBootVersion}") {
exclude(module: 'snakeyaml')
}
api("org.yaml:snakeyaml:${Deps.snakeyamlVersion}")
api(libs.snakeyaml)

implementation(project(":bonita-engine-standalone"))
implementation(project(":bpm:bonita-server"))
Expand Down
8 changes: 4 additions & 4 deletions bonita-engine-standalone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ dependencies {
implementation "org.jboss.narayana.jta:narayana-jta:${Deps.narayanaVersion}"
implementation "org.apache.tomcat:tomcat-dbcp:${Deps.tomcatDbcpVersion}"
implementation "org.slf4j:slf4j-api:${Deps.slf4jVersion}"
runtimeOnly "com.h2database:h2:${Deps.h2Version}"
runtimeOnly libs.h2


annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok

testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"
testImplementation "org.postgresql:postgresql:${Deps.postgresqlVersion}"
testImplementation "com.mysql:mysql-connector-j:${Deps.mysqlVersion}"
testImplementation "com.h2database:h2:${Deps.h2Version}"
testImplementation libs.h2

}

Expand Down
6 changes: 3 additions & 3 deletions bonita-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencyManagement {
entry 'slf4j-api'
entry 'slf4j-jdk14'
}
dependency "com.h2database:h2:${Deps.h2Version}"
dependency libs.h2.get() as String
dependency "net.sf.ehcache:ehcache:${Deps.ehcacheVersion}"

dependencySet(group: 'org.springframework', version: Deps.springVersion) {
Expand All @@ -40,7 +40,7 @@ dependencyManagement {
}
dependency("commons-cli:commons-cli:${Deps.commonsCLIVersion}")
dependency "commons-codec:commons-codec:${Deps.commonscodec}"
dependency "org.apache.commons:commons-lang3:${Deps.commonsLangVersion}"
dependency libs.commonsLang.get() as String
dependency "org.apache.commons:commons-collections4:${Deps.commonsCollections4Version}"
dependency "jakarta.transaction:jakarta.transaction-api:${Deps.jakartaTransactionVersion}"
dependency "org.javassist:javassist:${Deps.javassistVersion}"
Expand All @@ -52,7 +52,7 @@ dependencyManagement {
dependency "org.apache.tomcat:tomcat-dbcp:${Deps.tomcatDbcpVersion}"
dependency "org.jboss.narayana.jta:narayana-jta:${Deps.narayanaVersion}"
dependency "com.sun.activation:jakarta.activation:${Deps.activationVersion}"
dependency "org.yaml:snakeyaml:${Deps.snakeyamlVersion}"
dependency libs.snakeyaml.get() as String
dependency "org.mindrot:jbcrypt:${Deps.jbcryptVersion}"
dependency("org.quartz-scheduler:quartz:${Deps.quartzVersion}")
dependency "org.eclipse.jdt:ecj:${Deps.eclipseCompilerVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dependencies {
runtimeOnly "com.microsoft.sqlserver:mssql-jdbc:${Deps.mssqlVersion}"
runtimeOnly "org.postgresql:postgresql:${Deps.postgresqlVersion}"
testRuntimeOnly "ch.qos.logback:logback-classic:${Deps.logbackVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
testImplementation "org.projectlombok:lombok:${Deps.lombokVersion}"
testAnnotationProcessor libs.lombok
testImplementation libs.lombok
testImplementation "org.awaitility:awaitility:${Deps.awaitilityVersion}"
}

Expand Down
2 changes: 1 addition & 1 deletion bonita-integration-tests/bonita-query-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
dependencies {
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "com.h2database:h2:${Deps.h2Version}"
testImplementation libs.h2
testImplementation "org.springframework:spring-beans:${Deps.springVersion}"
testImplementation "org.springframework:spring-tx:${Deps.springVersion}"
testImplementation "org.springframework:spring-test:${Deps.springVersion}"
Expand Down
4 changes: 2 additions & 2 deletions bonita-test-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
compileOnly("org.eclipse.jetty:jetty-servlet:${Deps.jettyVersion}")
compileOnly(project(':bpm:bonita-api:bonita-server-api-http'))

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok

testImplementation project(':bpm:bonita-server')
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
Expand Down
4 changes: 2 additions & 2 deletions bpm/bonita-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies {
runtimeOnly "com.sun.activation:jakarta.activation"

compileOnly project(':bpm:bonita-sap-jco-connector-api')
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly libs.lombok
annotationProcessor libs.lombok

testImplementation project(':bpm:bonita-sap-jco-connector-api')
testImplementation "junit:junit:${Deps.junit4Version}"
Expand Down
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-actor-mapping/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ dependencies {
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-category/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-contract-data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dependencies {
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 1 addition & 3 deletions bpm/bonita-core/bonita-core-data/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@


dependencies {
api project(':bpm:bonita-core:bonita-process-instance')
api project(':services:bonita-data-instance')
api project(':services:bonita-expression')
api project(':services:bonita-commons')
api "org.apache.commons:commons-lang3:${Deps.commonsLangVersion}"
api libs.commonsLang
api project(':services:bonita-cache')
api project(':services:bonita-persistence')
testImplementation "junit:junit:${Deps.junit4Version}"
Expand Down
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-form-mapping/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ dependencies {
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-login/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ dependencies {
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "ch.qos.logback:logback-classic:${Deps.logbackVersion}"

compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly libs.lombok
annotationProcessor libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-parameter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ dependencies {
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"
testRuntimeOnly "ch.qos.logback:logback-classic:${Deps.logbackVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-process-comment/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ dependencies {
api project(':services:bonita-archive')
api project(':services:bonita-persistence')

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-process-definition/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ dependencies {
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "ch.qos.logback:logback-classic:${Deps.logbackVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
22 changes: 5 additions & 17 deletions bpm/bonita-core/bonita-process-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,21 @@ dependencies {
api "org.springframework:spring-context:${Deps.springVersion}"
api "org.springframework.session:spring-session-core:${Deps.springSessionVersion}"
api "org.springframework:spring-web:${Deps.springVersion}"
api "org.codehaus.groovy:groovy:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-servlet:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-xml:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-json:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-jmx:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-nio:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-groovysh:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-datetime:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-dateutil:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-docgenerator:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-jsr223:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-sql:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-templates:${Deps.groovyVersion}"
api "org.codehaus.groovy:groovy-yaml:${Deps.groovyVersion}"
api libs.bundles.groovy
api "io.micrometer:micrometer-core:${Deps.micrometerVersion}"

// Dependency on javax.annotations as it is not provided anymore in Java 11:
api("javax.annotation:javax.annotation-api:${Deps.javaxAnnotationsVersion}")

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok

testImplementation "org.junit.jupiter:junit-jupiter-api:${Deps.junit5Version}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${Deps.junit5Version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${Deps.junit5Version}"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${Deps.junit5Version}"
testAnnotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
testAnnotationProcessor libs.lombok

testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${Deps.mockitoVersion}"
Expand Down
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-process-instance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ dependencies {

testRuntimeOnly "ch.qos.logback:logback-classic:${Deps.logbackVersion}"

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
4 changes: 2 additions & 2 deletions bpm/bonita-core/bonita-supervisor-mapping/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies {
api project(':services:bonita-log')
api project(':services:bonita-persistence')

annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
}
8 changes: 4 additions & 4 deletions bpm/bonita-web-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
implementation "commons-fileupload:commons-fileupload:${Deps.commonsFileupload}"
implementation "commons-beanutils:commons-beanutils:${Deps.commonsBeanutilsVersion}"
implementation "org.apache.commons:commons-collections4:${Deps.commonsCollections4Version}"
implementation "org.apache.commons:commons-lang3:${Deps.commonsLangVersion}"
implementation libs.commonsLang
implementation "com.googlecode.json-simple:json-simple:${Deps.jsonSimpleVersion}"
implementation "org.tuckey:urlrewritefilter:${Deps.urlrewriteVersion}"
implementation "org.glassfish.web:jakarta.servlet.jsp.jstl:${Deps.jakartaJstlVersion}"
Expand All @@ -30,7 +30,7 @@ dependencies {
exclude(group: "org.codehaus.woodstox", module: "stax2-api")
}
implementation "com.fasterxml.woodstox:woodstox-core:${Deps.woodstoxCoreVersion}"
implementation "org.codehaus.groovy:groovy:${Deps.groovyVersion}"
implementation libs.groovyCore
implementation "org.apache.xbean:xbean-classloader:${Deps.xbeanClassloaderVersion}"
implementation "org.springframework:spring-core:${Deps.springVersion}"
implementation "org.springframework:spring-context:${Deps.springVersion}"
Expand All @@ -39,8 +39,8 @@ dependencies {
implementation "org.fedorahosted.tennera:jgettext:${Deps.jgettextVersion}"
implementation "com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:${Deps.owaspHTMLSanitizerVersion}"

compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly libs.lombok
annotationProcessor libs.lombok

testImplementation(project(":bpm:bonita-server"))
testImplementation "net.javacrumbs.json-unit:json-unit:${Deps.jsonUnitVersion}"
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
4 changes: 0 additions & 4 deletions buildSrc/src/main/groovy/Deps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ class Deps {
public static String commonsFileupload = "1.5"
public static String commonsBeanutilsVersion = "1.9.4"
public static String commonsCollections4Version = "4.4"
public static String commonsLangVersion = "3.11"
public static String tomcatDbcpVersion = "9.0.83"
public static String commonsCLIVersion = "1.4"
public static String semver4jVersion = '3.1.0'
public static String slf4jVersion = "1.7.36"
public static String h2Version = "1.4.199"

// Attention, see PassingPropertiesJCacheRegionFactory javadoc if this version changes:
public static String hibernateVersion = "5.4.32.Final"

public static String jacksonBomVersion = "2.15.3"
public static String snakeyamlVersion = "1.32"
public static String jakartaTransactionVersion = "1.3.3"
public static String jakartaServletVersion = "4.0.4"
// Keep this until all client projects have migrated to jakarta or it will break their builds !
Expand All @@ -42,7 +39,6 @@ class Deps {
public static String mssqlVersion = "8.4.1.jre8"
public static String oracleVersion = "19.3.0.0"
public static String postgresqlVersion = "42.4.4"
public static String lombokVersion = "1.18.30"

public static String narayanaVersion = "5.10.6.Final"
public static String jaxbVersion = "2.3.1"
Expand Down
11 changes: 11 additions & 0 deletions engine-settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
dependencyResolutionManagement {
versionCatalogs {
libs {
library("lombok", "org.projectlombok:lombok:1.18.30")
library("snakeyaml", "org.yaml:snakeyaml:1.32")
}
testlibs {
from(files("gradle/testlibs.versions.toml"))
}
}
}
include(':bonita-engine')
include(':platform:platform-resources')
include(':platform:platform-setup')
Expand Down
33 changes: 33 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[versions]
# The groovy version must be in synch with the runtime-bom artifact:
groovyVersion = "3.0.19"
springVersion = "5.3.32"
springBootVersion = "2.7.18"
commonsLangVersion = "3.11"

[libraries]
groovyCore = { module = "org.codehaus.groovy:groovy", version.ref = "groovyVersion" }
groovyServlet = { module = "org.codehaus.groovy:groovy-servlet", version.ref = "groovyVersion" }
groovyXml = { module = "org.codehaus.groovy:groovy-xml", version.ref = "groovyVersion" }
groovyJson = { module = "org.codehaus.groovy:groovy-json", version.ref = "groovyVersion" }
groovyJmx = { module = "org.codehaus.groovy:groovy-jmx", version.ref = "groovyVersion" }
groovyNio = { module = "org.codehaus.groovy:groovy-nio", version.ref = "groovyVersion" }
groovyGroovysh = { module = "org.codehaus.groovy:groovy-groovysh", version.ref = "groovyVersion" }
groovyDatetime = { module = "org.codehaus.groovy:groovy-datetime", version.ref = "groovyVersion" }
groovyDateutil = { module = "org.codehaus.groovy:groovy-dateutil", version.ref = "groovyVersion" }
groovyDocgenerator = { module = "org.codehaus.groovy:groovy-docgenerator", version.ref = "groovyVersion" }
groovyJsr223 = { module = "org.codehaus.groovy:groovy-jsr223", version.ref = "groovyVersion" }
groovySql = { module = "org.codehaus.groovy:groovy-sql", version.ref = "groovyVersion" }
groovyTemplates = { module = "org.codehaus.groovy:groovy-templates", version.ref = "groovyVersion" }
groovyYaml = { module = "org.codehaus.groovy:groovy-yaml", version.ref = "groovyVersion" }

h2 = "com.h2database:h2:1.4.199"

commonsLang = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commonsLangVersion" }

[bundles]
groovy = ["groovyCore", "groovyServlet", "groovyXml", "groovyJson", "groovyJmx", "groovyNio", "groovyGroovysh", "groovyDatetime",
"groovyDateutil", "groovyDocgenerator", "groovyJsr223", "groovySql", "groovyTemplates", "groovyYaml"]

[plugins]
dependencyUpdates = { id = "com.github.ben-manes.versions", version = "0.51.0" }
10 changes: 10 additions & 0 deletions gradle/testlibs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[versions]
junit5Version = "5.6.3"

[libraries]
junit5api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit5Version" }
junitJupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit5Version" }
junitVintageEngine = { group = "org.junit.vintage", name = "junit-vintage-engine", version.ref = "junit5Version" }

[bundles]
junit5 = ['junit5api', 'junitJupiterEngine']
4 changes: 2 additions & 2 deletions platform/platform-resources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ group = 'org.bonitasoft.platform'
description = ''

dependencies {
annotationProcessor "org.projectlombok:lombok:${Deps.lombokVersion}"
compileOnly "org.projectlombok:lombok:${Deps.lombokVersion}"
annotationProcessor libs.lombok
compileOnly libs.lombok
api "org.springframework:spring-tx:${Deps.springVersion}"
api "org.springframework:spring-jdbc:${Deps.springVersion}"
api "org.springframework:spring-context:${Deps.springVersion}"
Expand Down
2 changes: 1 addition & 1 deletion platform/platform-setup-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


dependencies {
api "org.apache.commons:commons-lang3:${Deps.commonsLangVersion}"
api libs.commonsLang
api "org.apache.commons:commons-exec:${Deps.commonsExecVersion}"
}

Expand Down
Loading

0 comments on commit 6a1e113

Please sign in to comment.