Skip to content

Ghidra is a software reverse engineering (SRE) framework

1.9 KB
Raw Blame
/* ###
 * IP: GHIDRA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
apply from: "$rootProject.projectDir/gradle/distributableGhidraExtension.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 from: "$rootProject.projectDir/gradle/javadoc.gradle"
apply plugin: 'eclipse'

eclipse.project.name = 'Xtra Jython'


def JYTHON = "org.python:jython-standalone:2.7.4"
def JYTHON_DIR = "jython-2.7.4"

configurations {
	jython
}

dependencies {
	api project(':Base')
 	jython JYTHON
	api 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()
	}
	
	gradle.taskGraph.whenReady {
		from zipTree(configurations.jython.singleFile)
		include "Lib/**"
		
		destinationDir = file("build/data/${JYTHON_DIR}")
	}
}

task jythonSrcCopy(type: Copy) {
	description = "Copy jython-src directory (for Feature Jython)"
	
	from(file("jython-src"))
	
	destinationDir = file("build/data/jython-src")
}

// Ensure that Jython is usable in development xx
rootProject.prepDev.dependsOn jythonUnpack
jar.dependsOn jythonUnpack
jar.dependsOn jythonSrcCopy