Major refactoring of the gradle build system.

This commit is contained in:
ghidravore
2019-04-09 11:59:17 -04:00
parent 62a180e0ae
commit f1e50fb079
198 changed files with 2005 additions and 2252 deletions

View File

@@ -8,3 +8,6 @@ dependencies {
exclude group: 'junit', module: 'junit'
}
}
rootProject.createJsondocs.dependsOn jar

View File

@@ -1,5 +1,4 @@
apply plugin: 'eclipse'
apply plugin: 'java'
eclipse.project.name = '_BuildFiles'
ext.isPureEclipseProject = true
ext.excludeFromBuild = true

View File

@@ -1,8 +1,4 @@
##VERSION: 2.0
.classpath||GHIDRA||||END|
.project||GHIDRA||||END|
JsonDoclet/.classpath||GHIDRA||||END|
JsonDoclet/.project||GHIDRA||||END|
JsonDoclet/Module.manifest||GHIDRA||||END|
JsonDoclet/build.gradle||GHIDRA||||END|
build.gradle||GHIDRA||||END|

View File

@@ -1,3 +1,5 @@
apply plugin: 'java'
/* Requires Eclipse PDE
apply plugin: 'eclipse'
eclipse {
project {
@@ -21,6 +23,7 @@ eclipse {
}
}
}
*/
// We want GhidraDev to run with Eclipses launched with Java 8
sourceCompatibility = 1.8
@@ -45,13 +48,17 @@ File pyDevDestDir = file("build/data/buildDependencies/pydev")
File cdtDestDir = file("build/data/buildDependencies/cdt")
task utilityJar(type:Copy) {
from (project(':Utility').jar)
doFirst {
from (project(':Utility').jar)
}
destinationDir libraryJarDestDir
}
task launchSupportJar(type:Copy) {
from (project(':LaunchSupport').jar)
doFirst {
from (project(':LaunchSupport').jar)
}
destinationDir libraryJarDestDir
}
@@ -85,8 +92,18 @@ task cdtUnpack(type:Copy) {
destinationDir cdtDestDir
}
rootProject.assembleDistribution {
from ("${BIN_REPO}/GhidraBuild/EclipsePlugins/GhidraDev") {
include 'GhidraDev*.zip'
into "Extensions/Eclipse/GhidraDev/"
}
from ("${this.projectDir}/GhidraDev_README.html") {
into "Extensions/Eclipse/GhidraDev/"
}
}
// PrepDev dependencies
prepDev.dependsOn utilityJar
prepDev.dependsOn launchSupportJar
prepDev.dependsOn pyDevUnpack
prepDev.dependsOn cdtUnpack
rootProject.prepDev.dependsOn utilityJar
rootProject.prepDev.dependsOn launchSupportJar
rootProject.prepDev.dependsOn pyDevUnpack
rootProject.prepDev.dependsOn cdtUnpack

View File

@@ -0,0 +1,17 @@
apply plugin: 'eclipse'
rootProject.assembleDistribution {
from (this.project.projectDir) {
into "Extensions/IDAPro"
exclude "certification.manifest"
exclude ".classpath"
exclude ".project"
}
// Special Case: The xmlldr.py file needs to be in two places in the distribution, so
// after copying over the full IDA directory structure above, do an additional copy
// of this one specific file to the 'plugins' folder.
from (this.project.file("Python/6xx/loaders/xmlldr.py")) {
into "Extensions/IDAPro/Python/6xx/plugins"
}
}

View File

@@ -8,3 +8,4 @@ Python/7xx/plugins/xml_exporter.py||GHIDRA||||END|
Python/7xx/plugins/xml_importer.py||GHIDRA||||END|
Python/7xx/python/idaxml.py||GHIDRA||||END|
README.html||GHIDRA||||END|
build.gradle||GHIDRA||||END|

View File

@@ -1,7 +1,14 @@
apply plugin: 'java'
apply plugin: 'eclipse'
eclipse.project.name = '_LaunchSupport'
// This should run in the oldest version of Java possible to maximize the odds of it running on a
// user's system.
sourceCompatibility = 1.7
targetCompatibility = 1.7
targetCompatibility = 1.7
rootProject.assembleDistribution {
from (jar) {
into "support"
}
}

View File

@@ -1,4 +1,2 @@
##VERSION: 2.0
.classpath||GHIDRA||||END|
.project||GHIDRA||||END|
build.gradle||GHIDRA||||END|

View File

@@ -1,4 +1,7 @@
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = '_Skeleton'
dependencies {
@@ -9,5 +12,15 @@ dependencies {
compileJava.enabled = false
jar.enabled = false
// NOTE: In a build, this file will get replaced by buildTemplate.gradle. This file mainly exists
// so we can get an Eclipse project for the Skeleton.
// NOTE: In a build, this file will get replaced by buildTemplate.gradle.
rootProject.assembleDistribution {
from (this.projectDir) {
exclude 'bin'
exclude 'build'
exclude 'ghidra_scripts/bin/'
exclude '.classpath'
exclude '.project'
rename "buildTemplate.gradle", "build.gradle"
into "Extensions/Ghidra/Skeleton"
}
}

View File

@@ -1,11 +1,9 @@
##VERSION: 2.0
.classpath||GHIDRA||||END|
.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
buildTemplate.gradle||GHIDRA||||END|
data/README.txt||GHIDRA||||END|
data/build.xml||GHIDRA||||END|
data/buildLanguage.xml||GHIDRA||||END|
data/languages/skel.cspec||GHIDRA||||END|
data/languages/skel.ldefs||GHIDRA||||END|
data/languages/skel.opinion||GHIDRA||||END|

View File

@@ -5,7 +5,7 @@ files are placed here rather than in the resources directory if the user may nee
An optional data/languages directory can exist for the purpose of containing various Sleigh language
specification files and importer opinion files.
The data/build.xml is used for building the contents of the data/languages directory.
The data/buildLanguage.xml is used for building the contents of the data/languages directory.
The skel language definition has been commented-out within the skel.ldefs file so that the
skeleton language does not show-up within Ghidra.

View File

@@ -1,34 +0,0 @@
apply plugin: 'eclipse'
eclipse {
project {
name = '_GhidraBuild'
resourceFilter {
appliesTo = 'FOLDERS'
type = 'EXCLUDE_ALL'
recursive = false
matcher {
id = 'org.eclipse.ui.ide.multiFilter'
arguments = '1.0-name-matches-true-false-EclipsePlugins'
}
}
resourceFilter {
appliesTo = 'FOLDERS'
type = 'EXCLUDE_ALL'
recursive = false
matcher {
id = 'org.eclipse.ui.ide.multiFilter'
arguments = '1.0-name-matches-true-false-LaunchSupport'
}
}
resourceFilter {
appliesTo = 'FOLDERS'
type = 'EXCLUDE_ALL'
recursive = false
matcher {
id = 'org.eclipse.ui.ide.multiFilter'
arguments = '1.0-name-matches-true-false-Skeleton'
}
}
}
}