Skip to content

Commit

Permalink
Move all versions numbers to gradle.properties and update dependencies (
Browse files Browse the repository at this point in the history
#13661)

* Move all versions to gradle.properties and update dependencies to latest compatible version

* Remove unused jaxb implementation
  • Loading branch information
jamesfredley authored Sep 20, 2024
1 parent a985bec commit e48e6a2
Show file tree
Hide file tree
Showing 20 changed files with 108 additions and 89 deletions.
29 changes: 14 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ buildscript {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "commons-io:commons-io:2.15.1"
classpath "io.github.gradle-nexus:publish-plugin:1.3.0"
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:10.0.1"
classpath "commons-io:commons-io:$commonsIOVersion"
classpath "io.github.gradle-nexus:publish-plugin:$gradleNexusPublishPluginVersion"
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:$gradleExtraConfigurationsPluginVersion"
classpath "com.bmuschko:gradle-nexus-plugin:$gradleNexusPluginVersion"
classpath "jakarta.xml.bind:jakarta.xml.bind-api:$jakartaXmlBindVersion"
classpath "org.glassfish.jaxb:jaxb-runtime:$jaxbImplVersion"
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1"
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:$gradleLicensePluginVersion"
}
}

Expand Down Expand Up @@ -443,15 +442,15 @@ subprojects { project ->
dependencies {
api "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
// MockHttpServletRequest/Response/Context used in many classes
api("org.springframework:spring-test:${springVersion}") {
api("org.springframework:spring-test:$springVersion") {
exclude group: 'commons-logging', module: 'commons-logging'
}
}
}

if (project.name =~ /^(grails-plugin-datasource|grails-test-suite)/) {
dependencies {
testImplementation 'hsqldb:hsqldb:1.8.1.1'
testImplementation "hsqldb:hsqldb:$hsqldbVesion"
testImplementation "com.h2database:h2:$h2Version"
}
}
Expand Down Expand Up @@ -489,12 +488,12 @@ subprojects { project ->
api groovyDependency
}

testImplementation "org.apache.groovy:groovy-test-junit5:${groovyVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.2"
testImplementation "org.junit.platform:junit-platform-runner:1.10.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.2"
testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitPlatformRunnerVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"

compileOnly 'com.github.spotbugs:spotbugs-annotations:4.8.6'
compileOnly "com.github.spotbugs:spotbugs-annotations:$jsr305Version"

if (project.name != "grails-docs") {
// Logging
Expand All @@ -503,10 +502,10 @@ subprojects { project ->

// Testing
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
testImplementation("org.spockframework:spock-core:${spockVersion}") { transitive = false }
testImplementation("org.spockframework:spock-core:$spockVersion") { transitive = false }
// Required by Spock's Mocking
testImplementation "cglib:cglib-nodep:${cglibVersion}"
testImplementation "org.objenesis:objenesis:${objenesisVersion}"
testRuntimeOnly "net.bytebuddy:byte-buddy:$bytebuddyVersion"
testImplementation "org.objenesis:objenesis:$objenesisVersion"
}
}

Expand Down
59 changes: 39 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,53 +1,72 @@
projectVersion=7.0.0-SNAPSHOT
antVersion=1.10.15
apacheMavenVersion=3.9.9
apacheMavenResolverVersion=1.9.2
asciidoctorjVersion=3.0.0
aspectjVersion=1.9.22.1
asyncVersion=7.0.0-SNAPSHOT
bytebuddyVersion=1.15.1
caffeineVersion=3.1.8
cglibVersion=2.2.2
commonsLangVersion=2.6
coberturaVersion=2.1.1
commonsCodecVersion=1.17.1
commonsLangVersion=3.17.0
commonsIOVersion=2.17.0
datastoreVersion=9.0.0-SNAPSHOT
directoryWatcherVersion=0.9.9
fieldsPluginVersion=5.0.2
directoryWatcherVersion=0.18.0
expectitCoreVersion=0.9.0
fieldsPluginVersion=5.0.3
gdocEngineVersion=1.0.1
gradleNexusPluginVersion=2.3.1
gradleNexusStagingPluginVersion=0.12.0
gradleNexusPublishPluginVersion=1.3.0
gradleExtraConfigurationsPluginVersion=10.0.1
gradleLicensePluginVersion=0.16.1
groovyVersion=4.0.22
gspVersion=7.0.0-SNAPSHOT
hamcrestVersion=3.0
h2Version=2.2.224
jacksonVersion=2.17.2
hsqldbVesion=1.8.1.1
hibernateDatastoreVersion=9.0.0-SNAPSHOT
itextVersion=2.0.8
jacksonVersion=2.17.2
jakartaAnnotationApiVersion=3.0.0
jakartaXmlBindVersion=4.0.2
jaxbImplVersion=4.0.5
jakartaInjectVersion=2.0.1
jakartaPersistenceVersion=3.1.0
jansiVersion=1.18
javaParserCoreVersion=3.25.10
jlineVersion=2.14.6
jnaVersion=5.14.0
junitVersion=4.13.2
logbackVersion=1.2.13
jnaVersion=5.15.0
jnrPosixVersion=3.1.19
joptSimpleVersion=5.0.4
jsoupVersion=1.18.1
jsr305Version=4.8.6
junitVersion=5.11.0
junitPlatformRunnerVersion=1.11.0
logbackVersion=1.5.8
legacyConvertersVersion=6.0.0-SNAPSHOT
methvinDirectoryWatcherVersion=0.18.0
micronautCacheVersion=4.3.0
micronautRuntimeGroovyVersion=4.3.0
micronautSpringVersion=5.7.0
micronautVersion=4.5.3
micronautCacheVersion=5.0.1
micronautRuntimeGroovyVersion=4.4.0
micronautSpringVersion=5.8.0
micronautVersion=4.6.5
mongodbJavaDriverVersion=5.1.4
objenesisVersion=3.3
objenesisVersion=3.4
plexusComponentApiVersion=1.0-alpha-33
plexusSecDispatcherVersion=1.4
plexusSisuInjectVersion=2.6.0
scaffoldingCoreVersion=2.1.0
servletApiVersion=6.0.0
slf4jVersion=1.7.36
snakeyamlVersion=2.2
slf4jVersion=2.0.16
snakeyamlVersion=2.3
spockVersion=2.3-groovy-4.0
springBootVersion=3.3.3
springBootVersion=3.3.4
springLoadedVersion=1.2.8.RELEASE
springVersion=6.1.12
springVersion=6.1.13
testingSupportVersion=4.0.0-SNAPSHOT
testingSupportVersionForTests=4.0.0-SNAPSHOT
tomcatLog4jVersion=8.5.2
tomcatVersion=10.1.30
viewsVersion=4.0.0-SNAPSHOT
xhtmlRendererVersion=8.0
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.daemon=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/unit-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configurations {

dependencies {
testRuntimeOnly files('src/test', 'src/grails/grails-app/utils', projectDir, "src/war/WEB-INF", coreJar.archivePath)
coverage "net.sourceforge.cobertura:cobertura:2.1.1"
coverage "net.sourceforge.cobertura:cobertura:$coberturaVersion"
}

// we disable the default test task of the java plugin as we use a bunch of custom ones.
Expand Down
2 changes: 1 addition & 1 deletion grails-bootstrap/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
api "org.yaml:snakeyaml:$snakeyamlVersion"
api "io.micronaut:micronaut-inject:$micronautVersion"

compileOnly("io.methvin:directory-watcher:$methvinDirectoryWatcherVersion")
compileOnly("io.methvin:directory-watcher:$directoryWatcherVersion")
compileOnly("org.fusesource.jansi:jansi:$jansiVersion")
compileOnly("jline:jline:$jlineVersion")
compileOnly("net.java.dev.jna:jna:$jnaVersion")
Expand Down
2 changes: 1 addition & 1 deletion grails-codecs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
api 'commons-codec:commons-codec:1.17.1'
api "commons-codec:commons-codec:$commonsCodecVersion"
}
4 changes: 2 additions & 2 deletions grails-console/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies {
"net.java.dev.jna:jna:$jnaVersion"

api("org.springframework.boot:spring-boot:$springBootVersion")
api "org.springframework:spring-test:${springVersion}"
api "org.springframework:spring-test:$springVersion"

api "org.springframework:spring-web:${springVersion}"
api "org.springframework:spring-web:$springVersion"

api "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
}
16 changes: 8 additions & 8 deletions grails-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ dependencies {

implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
api("org.springframework.boot:spring-boot:$springBootVersion")
api("org.springframework:spring-core:${springVersion}") {
api("org.springframework:spring-core:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}
api("org.springframework:spring-tx:${springVersion}") {
api("org.springframework:spring-tx:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}
api("org.springframework:spring-beans:${springVersion}") {
api("org.springframework:spring-beans:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}
api("org.springframework:spring-context:${springVersion}") {
api("org.springframework:spring-context:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}

compileOnly("org.springframework:spring-test:${springVersion}") {
compileOnly("org.springframework:spring-test:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}
compileOnly("org.apache.groovy:groovy-templates:$groovyVersion")
Expand Down Expand Up @@ -69,18 +69,18 @@ dependencies {
testAnnotationProcessor "io.micronaut:micronaut-runtime:$micronautVersion"
testAnnotationProcessor "io.micronaut:micronaut-inject-java:$micronautVersion"

testImplementation("org.springframework:spring-jdbc:${springVersion}") {
testImplementation("org.springframework:spring-jdbc:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}

testImplementation "org.hamcrest:hamcrest-core:1.3"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"

testRuntimeOnly "com.h2database:h2:$h2Version"
testRuntimeOnly "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"

// These dependencies are not required, but due to a Groovy compiler bug they are loaded by Groovy and hence
// have to be on the path for compilation even though they shouldn't be
api "org.apache.ant:ant:${antVersion}"
api "org.apache.ant:ant:$antVersion"
api "jline:jline:$jlineVersion"
api "org.fusesource.jansi:jansi:$jansiVersion"

Expand Down
14 changes: 7 additions & 7 deletions grails-docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ configurations {

dependencies {
gradleConf gradleApi()
api "commons-lang:commons-lang:$commonsLangVersion",
api "org.apache.commons:commons-lang3:$commonsLangVersion",
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
"org.apache.ant:ant:$antVersion",
'org.grails:grails-gdoc-engine:1.0.1',
"org.grails:grails-gdoc-engine:$gdocEngineVersion",
"org.yaml:snakeyaml:$snakeyamlVersion",
"org.apache.groovy:groovy-ant:$groovyVersion"

api 'org.asciidoctor:asciidoctorj:2.5.13'
api('org.xhtmlrenderer:core-renderer:8.0') {
api "org.asciidoctor:asciidoctorj:$asciidoctorjVersion"
api("org.xhtmlrenderer:core-renderer:$xhtmlRendererVersion") {
exclude group: 'bouncycastle', module:'bcprov-jdk14'
}

runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"

runtimeOnly('com.lowagie:itext:2.0.8')
runtimeOnly "com.lowagie:itext:$itextVersion"

api 'org.jsoup:jsoup:1.17.2'
testImplementation("org.spockframework:spock-core:${spockVersion}") { transitive = false }
api "org.jsoup:jsoup:$jsoupVersion"
testImplementation("org.spockframework:spock-core:$spockVersion") { transitive = false }
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;

public class StringEscapeCategory {
private StringEscapeCategory() {
Expand All @@ -30,6 +30,7 @@ public static String encodeAsUrlFragment(String str) {
}

public static String encodeAsHtml(String str) {
return StringEscapeUtils.escapeHtml(str);
// StringEscapeUtils.escapeHtml() has become escapeHtml4() in org.apache.commons.lang3
return StringEscapeUtils.escapeHtml4(str);
}
}
2 changes: 1 addition & 1 deletion grails-encoder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ dependencies {
api project(":grails-core")
// HtmlUtils is used from spring-web
api "org.apache.groovy:groovy-json:$groovyVersion"
api "org.springframework:spring-web:${springVersion}"
api "org.springframework:spring-web:$springVersion"
}
4 changes: 2 additions & 2 deletions grails-plugin-datasource/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dependencies {
api("org.springframework:spring-jdbc:${springVersion}") {
api("org.springframework:spring-jdbc:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}

api "org.apache.groovy:groovy-sql:$groovyVersion"

api("org.springframework:spring-context:${springVersion}") {
api("org.springframework:spring-context:$springVersion") {
exclude group: 'commons-logging', module:'commons-logging'
}

Expand Down
2 changes: 1 addition & 1 deletion grails-plugin-services/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api "org.springframework:spring-tx:${springVersion}"
api "org.springframework:spring-tx:$springVersion"

api project(":grails-core"), project(":grails-plugin-datasource")
}
2 changes: 1 addition & 1 deletion grails-plugin-url-mappings/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
api project(":grails-web"), project(":grails-plugin-controllers")
api "junit:junit:${junitVersion}"
api "org.junit.jupiter:junit-jupiter-api:$junitVersion"
}
26 changes: 13 additions & 13 deletions grails-shell/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@ dependencies {
exclude group: "org.codehaus.groovy", module: "groovy"
}
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
implementation("org.apache.maven:maven-resolver-provider:3.9.9") {
implementation("org.apache.maven:maven-resolver-provider:$apacheMavenVersion") {
exclude group: "com.google.guava", module: "guava"
}
compileOnly "net.sf.jopt-simple:jopt-simple:5.0.4"
compileOnly "net.sf.jopt-simple:jopt-simple:$joptSimpleVersion"

implementation("org.apache.maven:maven-settings-builder:3.6.3") {
implementation("org.apache.maven:maven-settings-builder:$apacheMavenVersion") {
exclude group: "javax.inject", module: "javax.inject"
}

implementation("org.sonatype.plexus:plexus-sec-dispatcher:1.4")
implementation("org.sonatype.sisu:sisu-inject-plexus:2.6.0") {
implementation "org.sonatype.plexus:plexus-sec-dispatcher:$plexusSecDispatcherVersion"
implementation("org.sonatype.sisu:sisu-inject-plexus:$plexusSisuInjectVersion") {
exclude group: "javax.enterprise", module: "cdi-api"
exclude group: "org.sonatype.sisu", module: "sisu-inject-bean"
}

implementation("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.22")
implementation("org.apache.maven.resolver:maven-resolver-impl:1.9.22")
implementation("org.apache.maven.resolver:maven-resolver-transport-file:1.9.22")
implementation("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22") {
implementation("org.apache.maven.resolver:maven-resolver-connector-basic:$apacheMavenResolverVersion")
implementation("org.apache.maven.resolver:maven-resolver-impl:$apacheMavenResolverVersion")
implementation("org.apache.maven.resolver:maven-resolver-transport-file:$apacheMavenResolverVersion")
implementation("org.apache.maven.resolver:maven-resolver-transport-http:$apacheMavenResolverVersion") {
exclude group: "org.slf4j", module:"jcl-over-slf4j"
exclude group: "commons-codec", module:"commons-codec"
}
implementation("commons-codec:commons-codec:1.17.1")
implementation "commons-codec:commons-codec:$commonsCodecVersion"

testImplementation "net.sf.expectit:expectit-core:0.9.0"
testImplementation "com.github.jnr:jnr-posix:3.1.19"
testImplementation "net.sf.expectit:expectit-core:$expectitCoreVersion"
testImplementation "com.github.jnr:jnr-posix:$jnrPosixVersion"

runtimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
runtimeOnly "org.codehaus.plexus:plexus-component-api:1.0-alpha-33"
runtimeOnly "org.codehaus.plexus:plexus-component-api:$plexusComponentApiVersion"

}

Expand Down
6 changes: 3 additions & 3 deletions grails-spring/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
api "org.springframework:spring-tx:${springVersion}"
api "org.springframework:spring-web:${springVersion}"
api "org.springframework:spring-context:${springVersion}"
api "org.springframework:spring-tx:$springVersion"
api "org.springframework:spring-web:$springVersion"
api "org.springframework:spring-context:$springVersion"
api project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
exclude group:"jline", module:"jline"
Expand Down
2 changes: 1 addition & 1 deletion grails-test-suite-persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {
testRuntimeOnly "com.h2database:h2:$h2Version"

// // Required for AspectJ support
testRuntimeOnly "org.springframework:spring-aspects:${springVersion}"
testRuntimeOnly "org.springframework:spring-aspects:$springVersion"
testRuntimeOnly "org.aspectj:aspectjrt:$aspectjVersion",
"org.aspectj:aspectjweaver:$aspectjVersion"

Expand Down
Loading

0 comments on commit e48e6a2

Please sign in to comment.