mirror of
https://github.com/revanced/smali.git
synced 2025-05-29 12:20:11 +02:00
Fix up the gradle build
This commit is contained in:
parent
8c1d8ddef2
commit
c5cf51ac69
@ -59,27 +59,36 @@ idea {
|
||||
excludeDirs.remove(sourceDir);
|
||||
}
|
||||
}
|
||||
|
||||
iml {
|
||||
withXml {
|
||||
it.node.@type = "PLUGIN_MODULE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We can't actually compile the plugin with gradle, so we just disable everything
|
||||
// except the tasks related to generating the IDEA module and ANTLR parser
|
||||
tasks.all {
|
||||
if (name != 'idea' && name != 'ideaModule' && name != 'generateParserAntlrSource') {
|
||||
if (!(name in ['idea', 'ideaModule', 'generateParserAntlrSource', 'clean'])) {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
task generateParserAntlrSource(type: JavaExec) {
|
||||
task generateParserAntlrSource(type: JavaExec, dependsOn: ":smali:generateGrammarSource") {
|
||||
def smaliOutputDir = file(relativePath(project.parent.childProjects.get('smali')
|
||||
.generateGrammarSource.outputDirectory))
|
||||
|
||||
inputs.file new File(smaliOutputDir, "smaliParser.tokens")
|
||||
inputs.dir file(antlrSource)
|
||||
outputs.dir file(antlrOutput)
|
||||
|
||||
mkdir(antlrOutput)
|
||||
def grammars = fileTree(antlrSource).include('**/smalideaParser.g')
|
||||
file(antlrOutput).mkdirs()
|
||||
|
||||
classpath = configurations.antlr3
|
||||
main = 'org.antlr.Tool'
|
||||
args '-fo', relativePath("${antlrOutput}/org/jf/smalidea")
|
||||
args '-lib', relativePath(project.parent.childProjects.get('smali').antlrOutput) + "/org/jf/smali"
|
||||
args grammars.files
|
||||
args '-lib', smaliOutputDir
|
||||
args new File(antlrSource, "smalideaParser.g")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user