-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
52 lines (42 loc) · 1.33 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import org.apache.tools.ant.filters.ReplaceTokens
//----------------------START "DO NOT MODIFY" SECTION------------------------------
def ghidraInstallDir
if (System.env.GHIDRA_INSTALL_DIR) {
ghidraInstallDir = System.env.GHIDRA_INSTALL_DIR
}
else if (project.hasProperty("GHIDRA_INSTALL_DIR")) {
ghidraInstallDir = project.getProperty("GHIDRA_INSTALL_DIR")
}
if (ghidraInstallDir) {
apply from: new File(ghidraInstallDir).getCanonicalPath() + "/support/buildExtension.gradle"
}
else {
throw new GradleException("GHIDRA_INSTALL_DIR is not defined!")
}
//----------------------END "DO NOT MODIFY" SECTION-------------------------------
def DISTRIBUTION_DIR = file("dist")
def PATH_IN_ZIP = "${project.name}"
archivesBaseName="Falcon"
version = 1.1
task sleighCompile(type: JavaExec) {
main = "ghidra.pcodeCPort.slgh_compile.SleighCompile"
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ['-Xmx2048M']
args = ['-a', 'data/languages']
}
task sleighClean(type: Delete) {
delete fileTree('data/languages') {
include '**/*.sla'
}
}
task distClean(type: Delete) {
delete fileTree('dist') {
include '**/*'
}
}
clean.dependsOn(sleighClean)
clean.dependsOn(distClean)
buildExtension {
baseName "${project.name}-${project.version}-Ghidra_${ghidra_version}".replace(' ', '_')
dependsOn sleighCompile
}