Skip to content

Commit

Permalink
Improvements to Grails FindMainClassTask (#142)
Browse files Browse the repository at this point in the history
* Improve registerMainClassTask implementation (#133)

Signed-off-by: Puneet Behl <[email protected]>

* Update GrailsGradlePlugin.groovy

* Cleanup registerFindMainClassTask

Signed-off-by: Puneet Behl <[email protected]>
  • Loading branch information
puneetbehl committed Aug 25, 2022
1 parent 49e50de commit 7ea2b98
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,13 +502,8 @@ class GrailsGradlePlugin extends GroovyPlugin {
findMainClassTask.mustRunAfter(project.tasks.withType(GroovyCompile))
} else if (!FindMainClassTask.class.isAssignableFrom(findMainClassTask.class)) {
def grailsFindMainClass = project.tasks.register("grailsFindMainClass", FindMainClassTask).get()
grailsFindMainClass.mustRunAfter(findMainClassTask)
findMainClassTask.dependsOn(grailsFindMainClass)
}

def bootRepackageTask = project.tasks.findByName("bootRepackage")
if (bootRepackageTask) {
bootRepackageTask.dependsOn findMainClassTask
grailsFindMainClass.dependsOn(findMainClassTask)
findMainClassTask.finalizedBy(grailsFindMainClass)
}
}

Expand Down

0 comments on commit 7ea2b98

Please sign in to comment.