Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3fe24e4

Browse files
committed
build: make groovy version configurable
Make the groovy version configurable by property or env variable.
1 parent 42a83de commit 3fe24e4

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ ext.set('grailsVersion', libs.versions.grails.get())
1010
ext.set('isSnapshot', projectVersion.endsWith('-SNAPSHOT'))
1111
ext.set('isReleaseVersion', !isSnapshot)
1212

13+
def groovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION')
14+
if (groovyVersion) {
15+
ext.set('groovy.version', groovyVersion)
16+
}
17+
1318
if(isReleaseVersion) {
1419
nexusPublishing {
1520
String nexusUser = System.getenv('SONATYPE_USERNAME')
@@ -35,7 +40,7 @@ subprojects {
3540
mavenCentral()
3641
maven { url = 'https://repo.grails.org/grails/core' }
3742
// mavenLocal() // Keep, this will be uncommented and used by CI (groovy-joint-workflow)
38-
if (libs.versions.groovy.get().endsWith('-SNAPSHOT')) {
43+
if (groovyVersion?.endsWith('-SNAPSHOT')) {
3944
// Used for testing locally against the latest snapshot of Groovy
4045
// Usage: ./gradlew -PgroovyVersion=X.X.X-SNAPSHOT build
4146
maven {

settings.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ buildCache {
2525

2626
rootProject.name = 'grails-async'
2727

28-
dependencyResolutionManagement {
29-
versionCatalogs {
30-
libs {
31-
def groovyVersion = System.getenv('GROOVY_VERSION')
32-
if (groovyVersion) {
33-
logger.warn "Using custom version $groovyVersion of Groovy due to GROOVY_VERSION being set."
34-
version('groovy', groovyVersion)
35-
}
36-
}
37-
}
38-
}
39-
4028
include 'docs'
4129
include 'grails-async-core'
4230
include 'grails-async-gpars'

0 commit comments

Comments
 (0)