Skip to content

Commit

Permalink
chore(gradle): convert some libs to version catalog (#2989)
Browse files Browse the repository at this point in the history
* chore(version catalog): convert xstream
* chore(version catalog): convert ehcache
* chore(version catalog): convert eclipseCompiler
* chore(deps): remove unused jbcrypt lib
* chore(version catalog): convert jakarta.activation
  • Loading branch information
educhastenier authored May 2, 2024
1 parent ea5b7c7 commit 6158002
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 63 deletions.
9 changes: 4 additions & 5 deletions bonita-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencyManagement {
entry 'slf4j-jdk14'
}
dependency libs.h2.get() as String
dependency "net.sf.ehcache:ehcache:${Deps.ehcacheVersion}"
dependency libs.ehCache.get() as String

dependencySet(group: 'org.springframework', version: libs.versions.springVersion.get()) {
entry 'spring-context'
Expand Down Expand Up @@ -47,14 +47,13 @@ dependencyManagement {
entry 'httpclient'
entry 'httpmime'
}
dependency "com.thoughtworks.xstream:xstream:${Deps.xstreamVersion}"
dependency libs.xstream.get() as String
dependency libs.tomcatDbcp.get() as String
dependency "org.jboss.narayana.jta:narayana-jta:${Deps.narayanaVersion}"
dependency "com.sun.activation:jakarta.activation:${Deps.activationVersion}"
dependency libs.jakartaActivation.get() as String
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}"
dependency(libs.eclipseCompiler.get() as String)
dependency("javax.annotation:javax.annotation-api:$Deps.javaxAnnotationsVersion")
dependencySet(group: "io.micrometer", version: Deps.micrometerVersion) {
entry "micrometer-core"
Expand Down
2 changes: 1 addition & 1 deletion bpm/bonita-api/bonita-server-api-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
api project(':services:bonita-platform-session')
api project(':services:bonita-session')
api project(':bpm:bonita-common')
api "com.thoughtworks.xstream:xstream:${Deps.xstreamVersion}"
api libs.xstream
api libs.commonsFileUpload
api libs.commonsIO
testImplementation libs.springTest
Expand Down
2 changes: 1 addition & 1 deletion bpm/bonita-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
dependencies {
api project(':bpm:bonita-common')
api libs.httpComponentsClient
api "com.thoughtworks.xstream:xstream:${Deps.xstreamVersion}"
api libs.xstream
api libs.httpComponentsMime
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
Expand Down
2 changes: 1 addition & 1 deletion bpm/bonita-web-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
implementation(project(":bpm:bonita-web-extensions"))
implementation libs.commonsIO
implementation libs.slf4jApi
implementation "net.sf.ehcache:ehcache:${Deps.ehcacheVersion}"
implementation libs.ehCache
implementation libs.commonsFileUpload
implementation libs.commonsBeanUtils
implementation libs.commonsCollections
Expand Down
5 changes: 0 additions & 5 deletions buildSrc/src/main/groovy/Deps.groovy
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
class Deps {

public static String xstreamVersion = "1.4.20"
public static String ehcacheVersion = "2.10.10.12.7"
public static String eclipseCompilerVersion = "3.20.0"
public static String jbcryptVersion = "0.4"
public static String activationVersion = "1.2.2"
public static String quartzVersion = "2.3.2"
public static String micrometerVersion = "1.6.1"

Expand Down
31 changes: 21 additions & 10 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jakartaServletVersion = "4.0.4"
# Keep this until all client projects have migrated to jakarta or it will break their builds !
javaxServletVersion = "4.0.1"
httpComponentsVersion = "4.5.13"
xstreamVersion = "1.4.20"
ehCacheVersion = "2.10.10.12.7"
eclipseCompilerVersion = "3.20.0"
jakartaActivationVersion = "1.2.2"

[libraries]
springCore = { module = "org.springframework:spring-core", version.ref = "springVersion" }
Expand Down Expand Up @@ -63,16 +67,16 @@ groovyYaml = { module = "org.codehaus.groovy:groovy-yaml", version.ref = "groovy

bonitaArtifactsModelBom = { module = "org.bonitasoft.engine:bonita-artifacts-model-dependencies", version.ref = "bonitaArtifactsModelVersion" }

bonitaCommonArtifactsModel = { module = "org.bonitasoft.engine:bonita-common-artifacts-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBusinessArchiveModel = { module = "org.bonitasoft.engine:bonita-business-archive", version.ref = "bonitaArtifactsModelVersion" }
bonitaProcessDefinitionModel = { module = "org.bonitasoft.engine:bonita-process-definition-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaFormMappingModel = { module = "org.bonitasoft.engine:bonita-form-mapping-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBusinessObjectModel = { module = "org.bonitasoft.engine:bonita-business-object-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBdmAccessControlModel = { module = "org.bonitasoft.engine:bonita-bdm-access-control-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaProfileModel = { module = "org.bonitasoft.engine:bonita-profile-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaOrganizationModel = { module = "org.bonitasoft.engine:bonita-organization-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaApplicationModel = { module = "org.bonitasoft.engine:bonita-application-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaConnectorModel = { module = "org.bonitasoft.engine:bonita-connector-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaCommonArtifactsModel = { module = "org.bonitasoft.engine:bonita-common-artifacts-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBusinessArchiveModel = { module = "org.bonitasoft.engine:bonita-business-archive", version.ref = "bonitaArtifactsModelVersion" }
bonitaProcessDefinitionModel = { module = "org.bonitasoft.engine:bonita-process-definition-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaFormMappingModel = { module = "org.bonitasoft.engine:bonita-form-mapping-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBusinessObjectModel = { module = "org.bonitasoft.engine:bonita-business-object-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaBdmAccessControlModel = { module = "org.bonitasoft.engine:bonita-bdm-access-control-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaProfileModel = { module = "org.bonitasoft.engine:bonita-profile-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaOrganizationModel = { module = "org.bonitasoft.engine:bonita-organization-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaApplicationModel = { module = "org.bonitasoft.engine:bonita-application-model", version.ref = "bonitaArtifactsModelVersion" }
bonitaConnectorModel = { module = "org.bonitasoft.engine:bonita-connector-model", version.ref = "bonitaArtifactsModelVersion" }

commonsLang = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commonsLangVersion" }
snakeyaml = "org.yaml:snakeyaml:1.32"
Expand All @@ -98,6 +102,13 @@ javaxServletApi = { group = "javax.servlet", name = "javax.servlet-api", version
httpComponentsClient = { group = "org.apache.httpcomponents", name = "httpclient", version.ref = "httpComponentsVersion" }
httpComponentsMime = { group = "org.apache.httpcomponents", name = "httpmime", version.ref = "httpComponentsVersion" }

xstream = { group = "com.thoughtworks.xstream", name = "xstream", version.ref = "xstreamVersion" }
ehCache = { group = "net.sf.ehcache", name = "ehcache", version.ref = "ehCacheVersion" }
eclipseCompiler = { group = "org.eclipse.jdt", name = "ecj", version.ref = "eclipseCompilerVersion" }
jakartaActivation = { group = "com.sun.activation", name = "jakarta.activation", version.ref = "jakartaActivationVersion" }



h2 = "com.h2database:h2:1.4.199"

lombok = "org.projectlombok:lombok:1.18.30"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
dependencies {
api project(':services:bonita-commons')
api libs.hibernateCore
api "org.eclipse.jdt:ecj:${Deps.eclipseCompilerVersion}"
api(libs.eclipseCompiler)
api libs.springCore
api libs.javassist
api project(':bpm:bonita-common')
Expand Down
2 changes: 1 addition & 1 deletion services/bonita-cache/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


dependencies {
api "net.sf.ehcache:ehcache:${Deps.ehcacheVersion}"
api libs.ehCache
api project(':services:bonita-commons')
api project(':services:bonita-session')
api libs.springContext
Expand Down
4 changes: 2 additions & 2 deletions services/bonita-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies {
exclude(module: 'commons-collections')
}
api libs.commonsIO
api "com.sun.activation:jakarta.activation:${Deps.activationVersion}"
api libs.jakartaActivation
api libs.commonsLang
api(group: 'com.thoughtworks.xstream', name: 'xstream', version: Deps.xstreamVersion)
api(libs.xstream)
api "io.micrometer:micrometer-core:${Deps.micrometerVersion}"
api libs.springContext
api libs.springBootAutoconfigure
Expand Down
3 changes: 1 addition & 2 deletions services/bonita-identity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ dependencies {
api project(':services:bonita-persistence')
api project(':services:bonita-commons')
api project(':services:bonita-events')
api "org.mindrot:jbcrypt:${Deps.jbcryptVersion}"
api "com.sun.activation:jakarta.activation:${Deps.activationVersion}"
api libs.jakartaActivation
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion services/bonita-persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
exclude(module: "jboss-transaction-api_1.2_spec")
exclude(group: "javax.activation") //replaced by jakarta
}
api "com.sun.activation:jakarta.activation:${Deps.activationVersion}"
api libs.jakartaActivation
api project(':services:bonita-session')
api project(':services:bonita-commons')
api project(':services:bonita-lock')
Expand Down

0 comments on commit 6158002

Please sign in to comment.