Skip to content

Commit

Permalink
Add minimum Java version so the grails forge cli can pull that proper…
Browse files Browse the repository at this point in the history
…ty instead of defaulting based on its own version
  • Loading branch information
jdaugherty committed Nov 23, 2024
1 parent 59a2ad9 commit b18e77c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,14 @@ subprojects { project ->
email = '[email protected]'
}
}

// Specify the minimum supported java version so that the grails-forge cli can pull this value
// out of the pom.xml instead of defaulting the version of java that the cli uses
withXml {
asNode().appendNode('properties').with {
appendNode('maven.compiler.release', project.findProperty('minimumJavaVersion'))
}
}
}

from components.java
Expand Down Expand Up @@ -441,8 +449,8 @@ subprojects { project ->
if (project.name == 'grails-dependencies') return
if (project.name == 'grails-bom') return

sourceCompatibility = "1.11"
targetCompatibility = "1.11"
sourceCompatibility = project.findProperty('minimumJavaVersion')
targetCompatibility = project.findProperty('minimumJavaVersion')

if (project.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {
dependencies {
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
projectVersion=6.2.3-SNAPSHOT
minimumJavaVersion=1.11
antVersion=1.10.15
aspectjVersion=1.9.22.1
asyncVersion=5.0.2
Expand Down

0 comments on commit b18e77c

Please sign in to comment.