< prev index next >
buildSrc/build.gradle
Print this page
rev 10863 : 8199071: Fix gradle deprecation warnings
Reviewed-by:
@@ -68,26 +68,12 @@
} else {
mavenCentral()
}
}
-// Include the to-be-generated antlr source files in the source set. We will generate
-// the antlr sources first before compilation.
-sourceSets {
- main.java.srcDirs = ["src/main/java", "$buildDir/generated-src/antlr"]
-}
-
-// Workaround for lack of Antlr 3 support in Gradle. By defining a configuration,
-// we can then give it a class path and use that classpath to execute a java command
-getConfigurations().create("antlr3");
-
dependencies {
- compile group: "org.antlr", name: "antlr", version: "3.1.3"
testCompile group: "junit", name: "junit", version: "4.8.2"
- antlr3 group: "org.antlr", name: "antlr-runtime", version: "3.1.3"
- antlr3 group: "org.antlr", name: "stringtemplate", version: "3.2"
- antlr3 group: "org.antlr", name: "antlr", version: "3.1.3"
}
// At the moment the ASM library shipped with Gradle that is used to
// discover the different test classes fails on Java 8, so in order
// to have sourceCompatibility set to 1.8 I have to also turn scanForClasses off
@@ -100,26 +86,5 @@
scanForTestClasses = false;
include("**/*Test.*");
exclude("**/DepthTest.*");
exclude("**/*Abstract*.*");
}
-
-// This is the task that will call antlr to generate the sources
-task generateGrammarSource(type: JavaExec) {
- description = "Generate JSL parser from Antlr3 grammars"
- String dest = "$buildDir/generated-src/antlr/com/sun/scenario/effect/compiler"
- String src = "src/main/antlr"
- inputs.dir file(src)
- outputs.dir file(dest)
- def grammars = fileTree(src).include("**/*.g")
- main = "org.antlr.Tool"
- classpath = configurations.antlr3
- args = ["-o", dest, grammars.files].flatten()
- // See RT-30955. This should be removed when JDK-8015656 is fixed
- ignoreExitValue = true
-}
-
-// Configure the compileJava task so that it relies on the task for generating
-// the grammar source (gotta have it prior to compilation)
-compileJava {
- dependsOn(generateGrammarSource);
-}
< prev index next >