feat(grails-gradle): move indy configuration from generated apps to Gradle plugin#15375
feat(grails-gradle): move indy configuration from generated apps to Gradle plugin#15375jamesfredley wants to merge 1 commit into7.1.xfrom
Conversation
8dbb060 to
f4a0ed7
Compare
|
#15321 was already closed by adding it to the gradle file. Can you help me understand why you want to move this to the extension? The current implementation will break anyone who tries to override it - which is something significant enough that I think it should at least go into 7.1.x. Are you wanting to change this default to true in Grails 8? That's the only reason I can think to move it to the extension. |
| * When enabled, Groovy uses JVM invokedynamic instead of traditional callsite caching. | ||
| * To enable invokedynamic in build.gradle: grails { indy = true } | ||
| */ | ||
| boolean indy = false |
There was a problem hiding this comment.
For anyone that generated an application with the 7.0.6+ codeline, it will now flip it back to false - making this a breaking change.
|
The change introduces a configurable 'indy' option in GrailsExtension, defaulting to false, and removes the hardcoded 'indy = false' from build templates. For apps generated with 7.0.6+ that had this setting, behavior remains the same. However, existing apps without the explicit setting may see indy flipped from its previous default (likely true) to false, potentially causing a breaking change in performance or behavior. |
|
As we work on Grails 8 we may be able to achieve performance closer with some ideas from #15374 plus changes in Groovy. |
…radle plugin
Move the Groovy invokedynamic (indy) configuration from generated
build.gradle files to the Grails Gradle Plugin, centralizing the
setting and providing user feedback.
Changes:
- Add 'indy' property to GrailsExtension (default: false)
- Configure GroovyCompile tasks in GrailsGradlePlugin to use the
extension's indy setting
- Display lifecycle message explaining indy is disabled for
performance and how to enable it
- Remove hardcoded indy=false from grails-forge template
- Remove hardcoded indy=false from grails-profiles base skeleton
The message appears once per project during configuration:
Grails: Groovy invokedynamic (indy) is disabled to improve
performance (see issue #15293).
To enable invokedynamic: grails { indy = true } in build.gradle
Closes #15321
f4a0ed7 to
c9544f6
Compare
jdaugherty
left a comment
There was a problem hiding this comment.
I'm good with this going into 7.1, but we need to update the upgrade guide to point out this difference. Can you add a blurb about this change?
Summary
Move the Groovy invokedynamic (indy) configuration from generated
build.gradlefiles to the Grails Gradle Plugin, centralizing the setting and providing user feedback.Changes
indyproperty toGrailsExtension(default:false)GroovyCompiletasks inGrailsGradlePluginto use the extension's indy settingindy=falsefrom grails-forge templateindy=falsefrom grails-profiles base skeletonUser Experience
The message appears once per project during configuration:
Users can enable indy in their
build.gradle:grails { indy = true }Testing
Closes #15321