jdaugherty commented on code in PR #14816:
URL: https://github.com/apache/grails-core/pull/14816#discussion_r2150185660


##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy:
##########
@@ -644,77 +656,72 @@ class GrailsGradlePlugin extends GroovyPlugin {
                 }
             }
 
-            // Set it on the extensions & spring boot extension "just" to be 
complete in case any other tasks use these values
             project.afterEvaluate {
-                def extraProperties = 
project.extensions.getByType(ExtraPropertiesExtension)
-                extraProperties.set('mainClassName', project.provider {
-                    if (extraProperties.has('mainClassName')) {
-                        return extraProperties.get('mainClassName')
-                    }
-
-                    File cacheFile = 
findMainClassTask.get().mainClassCacheFile.orNull?.asFile
-                    if (!cacheFile.exists()) {
-                        return null
+                // Support overrides - via mainClass property
+                def propertyMainClassName = project.findProperty('mainClass')

Review Comment:
   It technically can not be a string.  It could be a provider, and I'm trying 
to maintain the support for String || provider



##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy:
##########
@@ -644,77 +656,72 @@ class GrailsGradlePlugin extends GroovyPlugin {
                 }
             }
 
-            // Set it on the extensions & spring boot extension "just" to be 
complete in case any other tasks use these values
             project.afterEvaluate {
-                def extraProperties = 
project.extensions.getByType(ExtraPropertiesExtension)
-                extraProperties.set('mainClassName', project.provider {
-                    if (extraProperties.has('mainClassName')) {
-                        return extraProperties.get('mainClassName')
-                    }
-
-                    File cacheFile = 
findMainClassTask.get().mainClassCacheFile.orNull?.asFile
-                    if (!cacheFile.exists()) {
-                        return null
+                // Support overrides - via mainClass property
+                def propertyMainClassName = project.findProperty('mainClass')

Review Comment:
   It technically can be something other than a string.  It could be a 
provider, and I'm trying to maintain the support for String || provider



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to