ghidra/Ghidra/Features/Python/build.gradle

51 lines
1.3 KiB
Groovy

apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Features Python'
def JYTHON = "org.python:jython-standalone:2.7.2"
def JYTHON_DIR = "jython-2.7.2"
configurations {
jython
}
dependencies {
compile project(':Base')
helpPath project(path: ":Base", configuration: "helpPath")
jython JYTHON
compile JYTHON
}
task jythonUnpack(type: Copy) {
description "Unpack Jython Lib"
// Without this, the copyTask will unzip the file to check for "up to date"
onlyIf {
!file("build/data/${JYTHON_DIR}").exists()
}
from zipTree(configurations.jython.singleFile)
include "Lib/**"
destinationDir file("build/data/${JYTHON_DIR}")
}
task pythonSrcCopy(type: Copy) {
description "Copy python-src directory (for Feature Python)"
from(file("python-src"))
destinationDir file("build/data/python-src")
}
// Ensure that Jython is usable in development xx
rootProject.prepDev.dependsOn jythonUnpack
jar.dependsOn jythonUnpack
jar.dependsOn pythonSrcCopy