Skip to content

Removed gradle 'application' plugin from the application template#423

Merged
jamesfredley merged 5 commits intoapache:7.0.xfrom
gsartori:7.0.x
Nov 9, 2024
Merged

Removed gradle 'application' plugin from the application template#423
jamesfredley merged 5 commits intoapache:7.0.xfrom
gsartori:7.0.x

Conversation

@gsartori
Copy link
Contributor

@gsartori gsartori commented Nov 5, 2024

The Gradle "application" plugin is not required by a Spring Boot application, it was introduced in the Grails app template with the inclusion of Micronaut.

From the Gradle user guide:

The Application plugin facilitates creating an executable JVM application. It makes it easy to start the application locally during development, and to package the application as a TAR and/or ZIP including operating system specific start scripts.

I propose to remove the plugin, as part of a cleanup effort, since this is not the way we are using it in a Grails application.

@jamesfredley
Copy link
Contributor

@gsartori You will also need to update GrailsApplicationSpec and then the build should be successful.

@gsartori
Copy link
Contributor Author

gsartori commented Nov 7, 2024

Thank you for the hint, it should be okay now

then:
buildGradle.contains('mainClass.set("example.grails.Application")')

where:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the test name be updated to reflect that the Application class no longer is referenced in build.gradle?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so, I've updated it

@jamesfredley jamesfredley merged commit a875736 into apache:7.0.x Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants