-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update to Groovy 4.0 #8010
Merged
Merged
Update to Groovy 4.0 #8010
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7cd6033
Switch to Groovy 4
timyates f4a9205
Comment out Geb for now as it doesn't support Groovy 4
timyates b0a409d
Workaround bug(?) in Groovy
timyates a96fa0d
Accept api changes
timyates 6db1c36
Fix VisitorContextUtilsSpec
timyates f175865
Workaround same bug(?) in Groovy
timyates d8bad79
Another Groovy change?
timyates e95de04
Workaround same bug(?) in Groovy
timyates ba924e3
I think this test was wrong...
timyates ed0101f
Workaround same bug(?) in Groovy
timyates cad3504
Workaround same bug(?) in Groovy
timyates 74a608b
Workaround same bug(?) in Groovy
timyates cdc1cff
Workaround same bug(?) in Groovy
timyates ce46c39
Open JDK modules so Groovy running Kapt works
timyates 80eb7b5
I think the Kapt/Spock issue is a bug in Groovy
timyates e3fe1e8
Merge branch '4.0.x' into groovy-4.0
timyates bc225b9
Open java.base/sun.security.x509 for secondary server test with Groov…
timyates e9c1e49
Don't open, add bouncycastle provider
timyates fd8d885
Fix GroovyClassElement for change in behavior for Groovy 4.0.x
timyates eb6655b
Remove requires now we provide bouncycastle
timyates 3eb90e2
Fix dependency substitution for the internal build plugin
timyates e6d2bdc
Move Geb tests to a separate module
timyates 6527aa0
Exclude groovy from Gorm dependency
timyates 25998ef
Reinstate Kotlin inject test and add-opens required modules
timyates 4193060
Only open for java 17+
timyates 0a16e5c
Merge branch '4.0.x' into groovy-4.0
timyates b3d528b
Stop throwing assertion errors for Notes with Groovy 4/java 17
timyates dfdfd3b
Remove comments
timyates d1d8346
Mention Groovy 4 in breaks.adoc
timyates 43155fd
Add Geb dependencies to catalog
timyates 254d83c
Move Geb specifics into Geb convention plugin
timyates bf97d12
Switch to lower-kebab case
timyates 540f498
Merge branch '4.0.x' into groovy-4.0
sdelamo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
buildSrc/src/main/groovy/io.micronaut.build.internal.convention-geb-base.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import io.micronaut.build.internal.ext.MicronautCoreExtension | ||
import io.micronaut.build.internal.ext.DefaultMicronautCoreExtension | ||
|
||
plugins { | ||
id "io.micronaut.build.internal.base" | ||
id "groovy" | ||
id "java-library" | ||
} | ||
|
||
micronautBuild { | ||
enableBom = false | ||
enableProcessing = false | ||
} | ||
|
||
group = projectGroupId | ||
|
||
def micronautBuild = (ExtensionAware) project.extensions.getByName("micronautBuild") | ||
def micronautCore = micronautBuild.extensions.create(MicronautCoreExtension, "core", DefaultMicronautCoreExtension, extensions.findByType(VersionCatalogsExtension)) | ||
micronautCore.documented.convention(true) | ||
|
||
if (System.getProperty('geb.env')) { | ||
apply plugin:"com.energizedwork.webdriver-binaries" | ||
|
||
webdriverBinaries { | ||
chromedriver "${chromedriverVersion}" | ||
geckodriver "${geckodriverVersion}" | ||
} | ||
} | ||
|
||
tasks.withType(Test).configureEach { | ||
useJUnitPlatform() | ||
jvmArgs '-Xmx2048m' | ||
systemProperty "micronaut.cloud.platform", "OTHER" | ||
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_15)) { | ||
jvmArgs "--enable-preview" | ||
} | ||
} | ||
|
||
tasks.named("test") { | ||
systemProperty "geb.env", System.getProperty('geb.env') | ||
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver') | ||
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver') | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.fork = true | ||
options.compilerArgs.add("-Amicronaut.processing.group=$project.group") | ||
options.compilerArgs.add("-Amicronaut.processing.module=micronaut-$project.name") | ||
options.compilerArgs.add("-Amicronaut.processing.omit.confprop.injectpoints=true") | ||
options.forkOptions.memoryMaximumSize = "2g" | ||
} | ||
|
||
tasks.withType(GroovyCompile).configureEach { | ||
options.fork = true | ||
options.compilerArgs.add("-Amicronaut.processing.group=$project.group") | ||
options.compilerArgs.add("-Amicronaut.processing.module=micronaut-$project.name") | ||
groovyOptions.forkOptions.memoryMaximumSize = "2g" | ||
} | ||
|
||
// This is for reproducible builds | ||
tasks.withType(Jar).configureEach { | ||
reproducibleFileOrder = true | ||
preserveFileTimestamps = false | ||
} | ||
|
||
dependencies { | ||
annotationProcessor libs.bundles.asm | ||
annotationProcessor(libs.micronaut.docs.map { | ||
if (micronautCore.documented.get()) { | ||
it | ||
} else { | ||
null | ||
} | ||
}) { | ||
transitive = false | ||
} | ||
|
||
api libs.managed.slf4j | ||
compileOnly libs.caffeine | ||
compileOnly libs.bundles.asm | ||
|
||
testAnnotationProcessor project(":http-validation") | ||
testAnnotationProcessor libs.bundles.asm | ||
|
||
testImplementation libs.caffeine | ||
testImplementation libs.bundles.asm | ||
|
||
// Geb currently requires Groovy 3, and Spock for Groovy 3 | ||
testImplementation libs.geb.spock | ||
testImplementation libs.spock.for.geb | ||
testImplementation libs.geb.groovy.test | ||
testImplementation libs.selenium.driver.htmlunit | ||
testImplementation libs.selenium.remote.driver | ||
testImplementation libs.selenium.api | ||
testImplementation libs.selenium.support | ||
|
||
testRuntimeOnly libs.htmlunit | ||
testRuntimeOnly libs.selenium.driver.chrome | ||
testRuntimeOnly libs.selenium.driver.firefox | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So while this will work to build and execute this module, this won't be propagated to consumers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's ok... It's only stopping the micronaut-build internal plugin pulling in the codehaus dependency here
Once micronaut-build is updated, I believe we can get rid of this