sbglasius commented on code in PR #15799:
URL: https://github.com/apache/grails-core/pull/15799#discussion_r3503625881


##########
grails-core/src/main/groovy/org/grails/compiler/injection/GlobalGrailsClassInjectorTransformation.groovy:
##########
@@ -176,14 +176,43 @@ class GlobalGrailsClassInjectorTransformation implements 
ASTTransformation, Comp
         generatePluginXml(pluginClassNode, pluginVersion, transformedClasses, 
pluginXmlFile)
     }
 
+    /**
+     * The system property signalling that each project compiles into its own 
isolated output
+     * directory. When set, the transform must never fall back to a 
shared/guessed location, which can
+     * leak one module's generated metadata into another.
+     */
+    public static final String ISOLATED_BUILD_PROPERTY = 
'grails.isolated.build'
+
+    /**
+     * @return {@code true} when the {@code grails.isolated.build} system 
property is {@code true}.
+     */
+    static boolean isIsolatedBuild() {
+        return 
Boolean.parseBoolean(System.getProperty(ISOLATED_BUILD_PROPERTY))
+    }
+
     static File resolveCompilationTargetDirectory(SourceUnit source) {
+        resolveCompilationTargetDirectory(source, isIsolatedBuild())

Review Comment:
   ```suggestion
           resolveCompilationTargetDirectory(source, isolatedBuild)
   ```
   Property access instead



-- 
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