mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
87 lines
2 KiB
Groovy
87 lines
2 KiB
Groovy
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
|
|
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
|
|
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
|
|
apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
|
|
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
|
|
|
|
apply plugin: 'eclipse'
|
|
eclipse.project.name = 'Debug Debugger-agent-gdb'
|
|
|
|
dependencies {
|
|
compile project(':Framework-AsyncComm')
|
|
compile project(':Framework-Debugging')
|
|
compile project(':Debugger-gadp')
|
|
compile 'org.python:jython-standalone:2.7.1'
|
|
|
|
testCompile project(path: ':Debugger-gadp', configuration: 'testArtifacts')
|
|
}
|
|
|
|
def boolean filterJar(File jarfile) {
|
|
if (jarfile.name.contains("gradle-api")) {
|
|
return false
|
|
} else if (jarfile.name.contains("groovy-all")) {
|
|
return false
|
|
} else if (jarfile.name.contains("gradle-installation-beacon")) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes['Main-Class'] = 'agent.gdb.gadp.GdbGadpServer'
|
|
}
|
|
}
|
|
|
|
task configureNodepJar {
|
|
doLast {
|
|
configurations.runtime.files.forEach {
|
|
if (filterJar(it)) {
|
|
nodepJar.from(zipTree(it))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task nodepJar(type: Jar) {
|
|
inputs.file(file(jar.archivePath))
|
|
dependsOn(configureNodepJar)
|
|
dependsOn(jar)
|
|
|
|
appendix = 'nodep'
|
|
manifest {
|
|
attributes['Main-Class'] = 'agent.gdb.gadp.GdbGadpServer'
|
|
}
|
|
|
|
from(zipTree(jar.archivePath))
|
|
}
|
|
|
|
task executableJar {
|
|
ext.execsh = file("src/main/sh/execjar.sh")
|
|
ext.jarfile = file(nodepJar.archivePath)
|
|
ext.outjar = file("${buildDir}/bin/gadp-agent-gdb")
|
|
dependsOn(nodepJar)
|
|
inputs.file(execsh)
|
|
inputs.file(jarfile)
|
|
outputs.file(outjar)
|
|
doLast {
|
|
outjar.parentFile.mkdirs()
|
|
outjar.withOutputStream { output ->
|
|
execsh.withInputStream { input ->
|
|
output << input
|
|
}
|
|
jarfile.withInputStream { input ->
|
|
output << input
|
|
}
|
|
}
|
|
exec {
|
|
commandLine("chmod", "+x", outjar)
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
if ("linux64".equals(getCurrentPlatformName())) {
|
|
dependsOn(":Framework-Debugging:testSpecimenLinux64")
|
|
}
|
|
}
|