1 apply plugin: 'java' 2 3 configurations { 4 antlrRuntime 5 } 6 7 sourceSets { 8 antlrRuntime { 9 java { 10 srcDirs = ["antlr-3.4/runtime/Java/src/main/java"] 11 exclude "**/org/antlr/runtime/tree/DOTTreeGenerator.java" 12 } 13 } 14 } 15 16 task runtimeJar(type: Jar) { 17 from sourceSets.antlrRuntime.output 18 dependsOn antlrRuntimeClasses 19 baseName "antlr" 20 appendix "runtime" 21 version "3.4" 22 } 23 24 artifacts { 25 antlrRuntime runtimeJar 26 }