ghidra/Ghidra/Features/Python/build.gradle
2019-03-26 13:46:51 -04:00

45 lines
1,023 B
Groovy

apply plugin: 'eclipse'
eclipse.project.name = 'Features Python'
apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
def JYTHON = "org.python:jython-standalone:2.7.1"
def JYTHON_DIR = "jython-2.7.1"
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
prepDev.dependsOn jythonUnpack
jar.dependsOn jythonUnpack
jar.dependsOn pythonSrcCopy