From 7ea2b98823fccaecdb86f123f29862e55071ee0c Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Wed, 24 Aug 2022 23:45:49 +0530 Subject: [PATCH] Improvements to Grails FindMainClassTask (#142) * Improve registerMainClassTask implementation (#133) Signed-off-by: Puneet Behl * Update GrailsGradlePlugin.groovy * Cleanup registerFindMainClassTask Signed-off-by: Puneet Behl --- .../grails/gradle/plugin/core/GrailsGradlePlugin.groovy | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy index 0aadf585..aeeac1fc 100644 --- a/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy +++ b/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy @@ -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) } }