Open codeconsole opened 10 months ago
With Grails 6.0.0 installed through SDKman, I see that snippet in build.gradle
after running:
grails create-app com.example.app
Using https://start.grails.org/ it also shows the required snippet.
@matthijsbierman that snippet shouldn’t be necessary and the plugin should automatically configure that behavior
@codeconsole I see what you mean. Agreed, it would be best if the plugin itself configures it.
This is already in place at https://github.com/grails/grails-gradle-plugin/blob/6.1.x/src/main/groovy/org/grails/gradle/plugin/web/gsp/GroovyPagePlugin.groovy#L87
Could you please verify if it still works after removing it from the build.gradle
for Grails 6.1.0-SNAPSHOT?
Sure, I will check
@puneetbehl
I can confirm that the following is no longer needed:
tasks.withType(War).configureEach { War war ->
war.dependsOn compileGroovyPages
}
I did notice one other thing. It seems like the source gsp pages are also included. Is this expected behavior?
3204 10-25-2023 17:37 WEB-INF/classes/layouts/main.gsp
2538 10-25-2023 17:37 WEB-INF/classes/sample/edit.gsp
2191 10-25-2023 17:37 WEB-INF/classes/sample/show.gsp
2329 10-25-2023 17:37 WEB-INF/classes/sample/create.gsp
1701 10-25-2023 17:37 WEB-INF/classes/sample/index.gsp
3880 10-25-2023 17:37 WEB-INF/classes/index.gsp
Also, has the code block been removed from the results of grails create-app
?
I am not sure where to check for that. How is the base build.gradle
generated? Where is base source code for that?
I think the class responsible for generating the build.gradle
is https://github.com/grails/grails-forge/blob/6.1.x/grails-forge-core/src/main/java/org/grails/forge/build/gradle/GradleBuild.java
3204 10-25-2023 17:37 WEB-INF/classes/layouts/main.gsp 2538 10-25-2023 17:37 WEB-INF/classes/sample/edit.gsp 2191 10-25-2023 17:37 WEB-INF/classes/sample/show.gsp 2329 10-25-2023 17:37 WEB-INF/classes/sample/create.gsp 1701 10-25-2023 17:37 WEB-INF/classes/sample/index.gsp 3880 10-25-2023 17:37 WEB-INF/classes/index.gsp
I did notice one other thing. It seems like the source gsp pages are also included. Is this expected behavior?
@puneetbehl ?
As of Grails 6.0.0, it is now required to add the following to an apps
build.gradle
This should be configured automatically by the plugin. Previous versions of grails did not require this and the mention of the required addition was not added to the release announcement or release notes for 6.0.0