Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile grails-shell, grails-gradle-model and grails-bootstrap w/ Gradle Groovy version #13653

Merged
merged 29 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f6de935
compile grails-shell and grails-gradle-model with the Groovy version …
jamesfredley Sep 18, 2024
9c66b00
Update grails-boostrap
jamesfredley Sep 19, 2024
f77f071
Merge branch '7.0.x' into jamesfredley/fix-use-gradle-groovy-version
jamesfredley Sep 20, 2024
42dd604
Remove code that forces Groovy 4 now that dependencies have been updated
jamesfredley Sep 20, 2024
ba22622
cleanup
jamesfredley Sep 20, 2024
4663a52
cleanup
jamesfredley Sep 20, 2024
d869a0c
restore groovy 4 configuration
jamesfredley Sep 20, 2024
3ab8ea4
Adjust dependency scope
jamesfredley Sep 20, 2024
743b4b6
more version cleanup
jamesfredley Sep 20, 2024
36942dd
more cleanup
jamesfredley Sep 20, 2024
8b74731
cleanup
jamesfredley Sep 20, 2024
0073110
update github workflow
jamesfredley Sep 21, 2024
27af60b
update github workflow
jamesfredley Sep 21, 2024
0051fff
Remove code that forces Groovy 4 now that dependencies have been updated
jamesfredley Sep 21, 2024
0d11153
try --rerun-tasks
jamesfredley Sep 21, 2024
6cfc4cb
test with groovy 3 on test
jamesfredley Sep 21, 2024
d1c0949
force groovy 3 in grails-bootstrap
jamesfredley Sep 21, 2024
6462ea5
groovy 4.0.23
jamesfredley Sep 21, 2024
95493cd
experiment
jamesfredley Sep 21, 2024
c1fa6a9
followup experiment
jamesfredley Sep 21, 2024
5bda1fb
Revert "force groovy 3 in grails-bootstrap"
jamesfredley Sep 21, 2024
0a98a80
Update dependencies
jamesfredley Sep 21, 2024
94391ba
Revert "try --rerun-tasks"
jamesfredley Sep 21, 2024
18640d5
Revert "Remove code that forces Groovy 4 now that dependencies have b…
jamesfredley Sep 21, 2024
e088592
Revert "update github workflow"
jamesfredley Sep 21, 2024
26f22d7
Revert "update github workflow"
jamesfredley Sep 21, 2024
17cc395
PR feedback
jamesfredley Sep 21, 2024
6b62af5
fix groovydoc
jamesfredley Sep 21, 2024
a926e13
fix: get `groovydoc` task working again
matrei Sep 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,19 @@ if (isReleaseVersion) {
}
}

allprojects {

// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
// FORCE UPGRADE OF GROOVY IN DEPENDENCIES TO GROOVY 4
// except in projects that will be run by Gradle during the build
configure(allprojects - project(':grails-shell') - project(':grails-bootstrap') - project(':grails-gradle-model')){
jamesfredley marked this conversation as resolved.
Show resolved Hide resolved
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.codehaus.groovy' && details.requested.name != 'groovy-bom') {
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: groovyVersion)
}
}
}
}

allprojects {
repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -482,8 +484,8 @@ subprojects { project ->
documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion"
documentation ("com.github.javaparser:javaparser-core:$javaParserCoreVersion")

if (project.name =~ /^(grails-bootstrap)/ || project.name =~ /^(grails-gradle-model)/) {
compileOnly groovyDependency
if (project.name =~ /^(grails-bootstrap)/ || project.name =~ /^(grails-gradle-model)/ || project.name =~ /^(grails-shell)/) {
// do nothing
} else {
api groovyDependency
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gradleNexusPluginVersion=2.3.1
gradleNexusPublishPluginVersion=1.3.0
gradleExtraConfigurationsPluginVersion=10.0.1
gradleLicensePluginVersion=0.16.1
groovyVersion=4.0.22
groovyVersion=4.0.23
gspVersion=7.0.0-SNAPSHOT
hamcrestVersion=3.0
h2Version=2.2.224
Expand Down
36 changes: 21 additions & 15 deletions grails-bootstrap/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
import org.apache.tools.ant.filters.ReplaceTokens

dependencies {
compileOnly ( "org.apache.groovy:groovy-xml:$groovyVersion" )
compileOnly ( "org.apache.groovy:groovy-templates:$groovyVersion" )
api "org.yaml:snakeyaml:$snakeyamlVersion"
api "io.micronaut:micronaut-inject:$micronautVersion"

compileOnly("io.methvin:directory-watcher:$directoryWatcherVersion")
compileOnly("org.fusesource.jansi:jansi:$jansiVersion")
compileOnly("jline:jline:$jlineVersion")
compileOnly("net.java.dev.jna:jna:$jnaVersion")
// compile grails-bootstap with the Groovy version provided by Gradle
// to ensure build compatibility with Gradle, currently Groovy 3.0.x
// when used by grails-gradle-plugin
// see: https://docs.gradle.org/current/userguide/compatibility.html#groovy
compileOnly "org.codehaus.groovy:groovy:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-templates:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-xml:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-ant:$GroovySystem.version"

compileOnly "io.methvin:directory-watcher:$directoryWatcherVersion"
compileOnly "org.fusesource.jansi:jansi:$jansiVersion"
compileOnly "jline:jline:$jlineVersion"
compileOnly "net.java.dev.jna:jna:$jnaVersion"

// Ant
compileOnly "org.apache.groovy:groovy-ant:$groovyVersion"
testImplementation ( "org.apache.groovy:groovy-xml:$groovyVersion" )
testImplementation ( "org.apache.groovy:groovy-templates:$groovyVersion" )
testImplementation("org.fusesource.jansi:jansi:$jansiVersion")
testImplementation("jline:jline:$jlineVersion")
api "org.yaml:snakeyaml:$snakeyamlVersion"
api "io.micronaut:micronaut-inject:$micronautVersion", {
exclude group: 'org.apache.groovy'
}

testImplementation "org.apache.groovy:groovy-xml:$groovyVersion"
testImplementation "org.apache.groovy:groovy-templates:$groovyVersion "
jamesfredley marked this conversation as resolved.
Show resolved Hide resolved
testImplementation "org.fusesource.jansi:jansi:$jansiVersion"
testImplementation "jline:jline:$jlineVersion"
}

processResources {
Expand Down
7 changes: 7 additions & 0 deletions grails-gradle-model/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencies {
// compile grails-gradle-model with the Groovy version provided by Gradle
// to ensure build compatibility with Gradle, currently Groovy 3.0.x
// when used by grails-gradle-plugin
// see: https://docs.gradle.org/current/userguide/compatibility.html#groovy
compileOnly "org.codehaus.groovy:groovy:$GroovySystem.version"
}
24 changes: 19 additions & 5 deletions grails-shell/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ ext {
}

dependencies {
// compile grails-shell with the Groovy version provided by Gradle
// to ensure build compatibility with Gradle, currently Groovy 3.0.x
// when used by grails-gradle-plugin
// see: https://docs.gradle.org/current/userguide/compatibility.html#groovy
compileOnly "org.codehaus.groovy:groovy:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-templates:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-xml:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-ant:$GroovySystem.version"
compileOnly "org.codehaus.groovy:groovy-json:$GroovySystem.version"

runtimeOnly "org.apache.groovy:groovy-ant:$groovyVersion"
runtimeOnly "org.apache.groovy:groovy-json:$groovyVersion"
runtimeOnly "org.apache.groovy:groovy-jmx:$groovyVersion"
runtimeOnly "org.apache.groovy:groovy-xml:$groovyVersion"

api project(":grails-bootstrap")
api project(":grails-gradle-model")
api "org.apache.ant:ant:$antVersion"
api "org.apache.groovy:groovy-ant:$groovyVersion"
api "org.apache.groovy:groovy-json:$groovyVersion"
api "org.apache.groovy:groovy-jmx:$groovyVersion"
api "org.fusesource.jansi:jansi:$jansiVersion"
api "jline:jline:$jlineVersion"
api "org.gradle:gradle-tooling-api:$gradleToolingApiVersion"
compileOnly "org.apache.groovy:groovy-templates:$groovyVersion"
api "org.apache.groovy:groovy-xml:$groovyVersion"

compileOnly "org.springframework.boot:spring-boot:$springBootVersion"
compileOnly "org.springframework.boot:spring-boot-loader-tools:$springBootVersion"
Expand Down Expand Up @@ -56,6 +66,10 @@ dependencies {

testImplementation "net.sf.expectit:expectit-core:$expectitCoreVersion"
testImplementation "com.github.jnr:jnr-posix:$jnrPosixVersion"
testImplementation "org.apache.groovy:groovy-xml:$groovyVersion"
testImplementation "org.apache.groovy:groovy-json:$groovyVersion"
testImplementation "org.apache.groovy:groovy-templates:$groovyVersion"
testImplementation "org.apache.groovy:groovy-ant:$groovyVersion"

runtimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
runtimeOnly "org.codehaus.plexus:plexus-component-api:$plexusComponentApiVersion"
Expand Down
Loading