mirror of
https://github.com/revanced/smali.git
synced 2025-05-23 18:16:23 +02:00
Use JavaExec instead of ant.java
This commit is contained in:
parent
c9afead1a9
commit
9382ba8591
@ -34,12 +34,10 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
|
||||
processResources.inputs.properties('version': { -> version})
|
||||
processResources.expand('version': { -> version})
|
||||
processResources.expand('version': { -> version})
|
||||
}
|
||||
|
||||
task proguard(type: JavaExec, dependsOn: jar) {
|
||||
setStandardOutput(java.lang.System.out);
|
||||
setErrorOutput(java.lang.System.err);
|
||||
classpath = files(configurations.proguard.asPath)
|
||||
main = 'proguard.ProGuard'
|
||||
args '-libraryjars ' + System.properties['java.home'] + '/lib/rt.jar'
|
||||
|
@ -31,51 +31,47 @@ dependencies {
|
||||
proguard 'net.sf.proguard:proguard-base:4.8'
|
||||
}
|
||||
|
||||
task generateAntlrSource {
|
||||
task generateAntlrSource(type: JavaExec) {
|
||||
inputs.dir file(antlrSource)
|
||||
outputs.dir file(antlrOutput)
|
||||
doLast {
|
||||
mkdir(antlrOutput)
|
||||
|
||||
def grammars = fileTree(antlrSource).include('**/*.g')
|
||||
mkdir(antlrOutput)
|
||||
def grammars = fileTree(antlrSource).include('**/*.g')
|
||||
|
||||
ant.java(classname: 'org.antlr.Tool', classpath: configurations.antlr3.asPath, fork: true) {
|
||||
arg(line: '-fo ' + antlrOutput + '/org/jf/smali')
|
||||
arg(line: grammars.files.join(" "))
|
||||
}
|
||||
}
|
||||
classpath = files(configurations.antlr3.asPath)
|
||||
main = 'org.antlr.Tool'
|
||||
args '-fo', relativePath(new File(antlrOutput, 'org/jf/smali'))
|
||||
args grammars.files
|
||||
}
|
||||
|
||||
task generateTestAntlrSource {
|
||||
task generateTestAntlrSource(type: JavaExec) {
|
||||
inputs.dir file(testAntlrSource)
|
||||
outputs.dir file(testAntlrOutput)
|
||||
doLast {
|
||||
mkdir(testAntlrOutput)
|
||||
|
||||
def grammars = fileTree(testAntlrSource).include('**/*.g')
|
||||
mkdir(testAntlrOutput)
|
||||
def grammars = fileTree(testAntlrSource).include('**/*.g')
|
||||
|
||||
ant.java(classname: 'org.antlr.Tool', classpath: configurations.antlr3.asPath, fork: true) {
|
||||
arg(line: '-fo ' + testAntlrOutput + '/org/jf/smali')
|
||||
arg(line: grammars.files.join(" "))
|
||||
}
|
||||
}
|
||||
classpath = files(configurations.antlr3.asPath)
|
||||
main = 'org.antlr.Tool'
|
||||
args '-fo', relativePath(new File(testAntlrOutput, 'org/jf/smali'))
|
||||
args grammars.files.join(' ')
|
||||
}
|
||||
|
||||
task generateJflexSource {
|
||||
task generateJflexSource(type: JavaExec) {
|
||||
inputs.dir file(jflexSource)
|
||||
outputs.dir file(jflexOutput)
|
||||
doLast {
|
||||
mkdir(jflexOutput)
|
||||
|
||||
def grammars = fileTree(jflexSource).include('**/*.flex')
|
||||
mkdir(jflexOutput)
|
||||
def grammars = fileTree(jflexSource).include('**/*.flex')
|
||||
|
||||
ant.java(classname: 'JFlex.Main', classpath: configurations.jflex.asPath, fork: true) {
|
||||
arg(line: '-d ' + jflexOutput + '/org/jf/smali')
|
||||
arg(line: grammars.files.join(" "))
|
||||
}
|
||||
}
|
||||
classpath = files(configurations.jflex.asPath)
|
||||
main = 'JFlex.Main'
|
||||
args '-q'
|
||||
args '-d', relativePath(new File(jflexOutput, 'org/jf/smali'))
|
||||
args grammars.files.join(' ')
|
||||
}
|
||||
|
||||
|
||||
compileJava.dependsOn generateAntlrSource, generateJflexSource
|
||||
compileTestJava.dependsOn generateTestAntlrSource
|
||||
|
||||
@ -92,7 +88,7 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
|
||||
processResources.inputs.properties('version': version)
|
||||
processResources.expand('version': version)
|
||||
processResources.expand('version': version)
|
||||
|
||||
proguard {
|
||||
def outFile = relativePath(buildDir) + '/libs/' + jar.baseName + '-' + jar.version + '-small' + '.' + jar.extension
|
||||
@ -106,8 +102,6 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
|
||||
task proguard(type: JavaExec, dependsOn: jar) {
|
||||
setStandardOutput(java.lang.System.out);
|
||||
setErrorOutput(java.lang.System.err);
|
||||
classpath = files(configurations.proguard.asPath)
|
||||
main = 'proguard.ProGuard'
|
||||
args '-libraryjars ' + System.properties['java.home'] + '/lib/rt.jar'
|
||||
|
Loading…
x
Reference in New Issue
Block a user