mirror of
https://github.com/revanced/smali.git
synced 2025-05-01 23:24:38 +02:00
Split out the build rule for the parser and tree walker
This commit is contained in:
parent
0dceb148f3
commit
87c1c0e054
@ -77,12 +77,25 @@ dependencies {
|
|||||||
proguard depends.proguard
|
proguard depends.proguard
|
||||||
}
|
}
|
||||||
|
|
||||||
task generateAntlrSource(type: JavaExec) {
|
task generateParserAntlrSource(type: JavaExec) {
|
||||||
inputs.dir file(antlrSource)
|
inputs.dir file(antlrSource)
|
||||||
outputs.dir file(antlrOutput)
|
outputs.dir file(antlrOutput)
|
||||||
|
|
||||||
mkdir(antlrOutput)
|
mkdir(antlrOutput)
|
||||||
def grammars = fileTree(antlrSource).include('**/*.g')
|
def grammars = fileTree(antlrSource).include('**/smaliParser.g')
|
||||||
|
|
||||||
|
classpath = configurations.antlr3
|
||||||
|
main = 'org.antlr.Tool'
|
||||||
|
args '-fo', relativePath("${antlrOutput}/org/jf/smali")
|
||||||
|
args grammars.files
|
||||||
|
}
|
||||||
|
|
||||||
|
task generateTreeWalkerAntlrSource(type: JavaExec) {
|
||||||
|
inputs.dir file(antlrSource)
|
||||||
|
outputs.dir file(antlrOutput)
|
||||||
|
|
||||||
|
mkdir(antlrOutput)
|
||||||
|
def grammars = fileTree(antlrSource).include('**/smaliTreeWalker.g')
|
||||||
|
|
||||||
classpath = configurations.antlr3
|
classpath = configurations.antlr3
|
||||||
main = 'org.antlr.Tool'
|
main = 'org.antlr.Tool'
|
||||||
@ -117,7 +130,7 @@ task generateJflexSource(type: JavaExec) {
|
|||||||
args grammars.files.join(' ')
|
args grammars.files.join(' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava.dependsOn generateAntlrSource, generateJflexSource
|
compileJava.dependsOn generateParserAntlrSource, generateTreeWalkerAntlrSource, generateJflexSource
|
||||||
compileTestJava.dependsOn generateTestAntlrSource
|
compileTestJava.dependsOn generateTestAntlrSource
|
||||||
|
|
||||||
// build a jar containing all dependencies
|
// build a jar containing all dependencies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user