changeset 11230:7fc05179c7db

8222036: antlr generated files written to wrong location on Windows Reviewed-by: arajkumar, mennen
author kcr
date Mon, 08 Apr 2019 12:55:14 -0700
parents 38f19a12abfd
children 06543fe1b967
files build.gradle
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Mon Apr 08 08:50:42 2019 -0700
+++ b/build.gradle	Mon Apr 08 12:55:14 2019 -0700
@@ -2098,6 +2098,12 @@
         // so we will do this by hand
 
         File wd = file(project.projectDir.path + "/src/jslc/antlr")
+        File outDir = file("$buildDir/gensrc/antlr")
+        def inJSL = "com/sun/scenario/effect/compiler/JSL.g4"
+        if (IS_WINDOWS) {
+            // antlr needs backslashes on Windows
+            inJSL = inJSL.replace("/", "\\")
+        }
 
         executable = JAVA
         classpath = project.configurations.antlr
@@ -2106,13 +2112,13 @@
 
         args = [
             "-o",
-            "$buildDir/gensrc/antlr",
+            outDir.toString(),
             "-package",
             "com.sun.scenario.effect.compiler",
-            "com/sun/scenario/effect/compiler/JSL.g4" ]
+            inJSL ]
 
         inputs.dir wd
-        outputs.dir file("$buildDir/gensrc/antlr")
+        outputs.dir outDir
     }
     sourceSets.jslc.java.srcDirs += "$buildDir/gensrc/antlr"
 
@@ -2450,14 +2456,7 @@
 
     addMavenPublication(project, [ 'base' ])
 
-    /*
-     * The following is a workaroud for JDK-8222036 (antlr generated
-     * files written to wrong location on Windows). This workaround should
-     * be removed as part of fixing JDK-8222036.
-     */
-    // addValidateSourceSets(project, sourceSets)
-    def srcSets = sourceSets - sourceSets.jslc
-    addValidateSourceSets(project, srcSets)
+    addValidateSourceSets(project, sourceSets)
 }
 
 project(":controls") {