Skip to content

Ghidra is a software reverse engineering (SRE) framework

Major refactoring of the gradle build system.

ghidravoref1e50fb0793d
diff --git a/GPL/CabExtract/build.gradle b/GPL/CabExtract/build.gradle
index a31cfd1bb4..81df352355 100644
--- a/GPL/CabExtract/build.gradle
+++ b/GPL/CabExtract/build.gradle
@@ -1,4 +1,6 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'GPL CabExtract'
project.ext.cabextract = "cabextract-1.6"
diff --git a/GPL/CabExtract/certification.manifest b/GPL/CabExtract/certification.manifest
index bd2a48b46b..b7acafafa0 100644
--- a/GPL/CabExtract/certification.manifest
+++ b/GPL/CabExtract/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: GPL 3
##MODULE IP: Public Domain
-.classpath||Public Domain||||END|
-.project||Public Domain||||END|
Module.manifest||Public Domain||||END|
build.gradle||Public Domain||||END|
data/cabextract-1.6.tar.gz||GPL 3||||END|
diff --git a/GPL/DMG/build.gradle b/GPL/DMG/build.gradle
index 29ea80ee06..447d999adb 100644
--- a/GPL/DMG/build.gradle
+++ b/GPL/DMG/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'GPL DMG'
/*********************************************************************************
diff --git a/GPL/DMG/certification.manifest b/GPL/DMG/certification.manifest
index 4f1c023b65..21888c616d 100644
--- a/GPL/DMG/certification.manifest
+++ b/GPL/DMG/certification.manifest
@@ -2,8 +2,6 @@
##MODULE IP: GPL 3
##MODULE IP: LGPL 2.1
##MODULE IP: Public Domain
-.classpath||Public Domain||||END|
-.project||Public Domain||||END|
Module.manifest||Public Domain||||END|
build.gradle||Public Domain||||END|
data/lib/catacombae_csframework.jar||LGPL 2.1||||END|
diff --git a/GPL/DemanglerGnu/build.gradle b/GPL/DemanglerGnu/build.gradle
index 80c5700600..1127b62fe2 100644
--- a/GPL/DemanglerGnu/build.gradle
+++ b/GPL/DemanglerGnu/build.gradle
@@ -1,4 +1,7 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply plugin: 'eclipse'
+
+
eclipse.project.name = 'GPL DemanglerGnu'
apply from: "../nativeBuildProperties.gradle"
diff --git a/GPL/DemanglerGnu/certification.manifest b/GPL/DemanglerGnu/certification.manifest
index 74cc5d18b3..8d6c35c7c8 100644
--- a/GPL/DemanglerGnu/certification.manifest
+++ b/GPL/DemanglerGnu/certification.manifest
@@ -4,8 +4,6 @@
##MODULE IP: LGPL 2.1
##MODULE IP: LGPL 3.0
##MODULE IP: Public Domain
-.classpath||GHIDRA||||END|
-.project||Public Domain||||END|
Module.manifest||Public Domain||||END|
build.gradle||Public Domain||||END|
src/demangler_gnu/README.txt||Public Domain||||END|
diff --git a/GPL/nativeBuildProperties.gradle b/GPL/nativeBuildProperties.gradle
index 3f35078b2e..8bcd6687a1 100644
--- a/GPL/nativeBuildProperties.gradle
+++ b/GPL/nativeBuildProperties.gradle
@@ -110,7 +110,7 @@ def isNativeBinaryMakeTask(Task task, String platform) {
******************************************************************************************/
tasks.addRule("Pattern: buildNatives_<platform name>]: build all natives for given platform") { String taskName ->
- if (taskName.startsWith("buildNatives_") && !project.hasProperty('EXCLUDE_FROM_NATIVE_BUILD')) {
+ if (taskName.startsWith("buildNatives_")) {
String platform = taskName - "buildNatives_"
task(taskName) { myTask ->
@@ -180,3 +180,25 @@ tasks.addRule("Pattern: prebuildNatives_<platform name>]: build all natives for
}
}
}
+
+/*****************************************************************************************
+ * The following block of code changes the output directory for native builds
+ * to <projectDir>/build/os/<platform>/<executable> ?? is there a better way to do this?
+ ****************************************************************************************/
+gradle.taskGraph.whenReady {
+ def p = this.project
+ p.tasks.withType(LinkExecutable).each { t ->
+ File f = t.linkedFile.getAsFile().get()
+ String filename = f.getName()
+ NativePlatform platform = t.targetPlatform.get()
+ String osName = platform.getName()
+ t.linkedFile = p.file("build/os/${osName}/$filename")
+ }
+ p.tasks.withType(LinkSharedLibrary).each { t ->
+ File f = t.linkedFile.getAsFile().get()
+ String filename = f.getName()
+ NativePlatform platform = t.targetPlatform.get()
+ String osName = platform.getName()
+ t.linkedFile = p.file("build/os/${osName}/$filename")
+ }
+}
diff --git a/Ghidra/Configurations/Public_Release/build.gradle b/Ghidra/Configurations/Public_Release/build.gradle
index 436f7af689..9b1f4a62db 100644
--- a/Ghidra/Configurations/Public_Release/build.gradle
+++ b/Ghidra/Configurations/Public_Release/build.gradle
@@ -1,2 +1,6 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Z Public Release'
diff --git a/Ghidra/Configurations/Public_Release/certification.manifest b/Ghidra/Configurations/Public_Release/certification.manifest
index 023e5cea71..2e4833ec30 100644
--- a/Ghidra/Configurations/Public_Release/certification.manifest
+++ b/Ghidra/Configurations/Public_Release/certification.manifest
@@ -1,32 +1,10 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/PDB_SYMBOL_SERVER_URLS.pdburl||GHIDRA||||END|
src/global/docs/ChangeHistory.html||GHIDRA||||END|
src/global/docs/UserAgreement.html||GHIDRA||||END|
src/global/docs/WhatsNew.html||GHIDRA||||END|
-src/global/docs/languages/html/Diagram1.png||GHIDRA||||END|
-src/global/docs/languages/html/Diagram2.png||GHIDRA||||END|
-src/global/docs/languages/html/Diagram3.png||GHIDRA||||END|
-src/global/docs/languages/html/additionalpcode.html||GHIDRA||||END|
-src/global/docs/languages/html/pcodedescription.html||GHIDRA||||END|
-src/global/docs/languages/html/pcoderef.html||GHIDRA||||END|
-src/global/docs/languages/html/pseudo-ops.html||GHIDRA||||END|
-src/global/docs/languages/html/reference.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_constructors.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_context.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_definitions.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_layout.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_preprocessing.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_ref.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_symbols.html||GHIDRA||||END|
-src/global/docs/languages/html/sleigh_tokens.html||GHIDRA||||END|
-src/global/docs/languages/index.html||GHIDRA||||END|
-src/global/docs/languages/manual_index.txt||GHIDRA||||END|
-src/global/docs/languages/versioning.html||GHIDRA||||END|
src/main/resources/UserAgreement.html||GHIDRA||||END|
src/main/resources/defaultTools/CodeBrowser.tool||GHIDRA||||END|
src/main/resources/splash.txt||GHIDRA||||END|
diff --git a/Ghidra/Extensions/SampleTablePlugin/build.gradle b/Ghidra/Extensions/SampleTablePlugin/build.gradle
index b2d2b0409f..b49b2ef531 100644
--- a/Ghidra/Extensions/SampleTablePlugin/build.gradle
+++ b/Ghidra/Extensions/SampleTablePlugin/build.gradle
@@ -1,9 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraExtension.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
+apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Xtra SampleTablePlugin'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-project.ext.includeExtensionInInstallation = true
dependencies {
compile project(':Base')
diff --git a/Ghidra/Extensions/SampleTablePlugin/certification.manifest b/Ghidra/Extensions/SampleTablePlugin/certification.manifest
index 961ee9eade..147e3af647 100644
--- a/Ghidra/Extensions/SampleTablePlugin/certification.manifest
+++ b/Ghidra/Extensions/SampleTablePlugin/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Extensions/sample/build.gradle b/Ghidra/Extensions/sample/build.gradle
index 3194674ffa..b0e9354f12 100644
--- a/Ghidra/Extensions/sample/build.gradle
+++ b/Ghidra/Extensions/sample/build.gradle
@@ -1,9 +1,10 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraExtension.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
+apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Xtra sample'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-
-project.ext.includeExtensionInInstallation = true
dependencies {
compile project(':Base')
diff --git a/Ghidra/Extensions/sample/certification.manifest b/Ghidra/Extensions/sample/certification.manifest
index 29ea6bdc29..4e6d44c844 100644
--- a/Ghidra/Extensions/sample/certification.manifest
+++ b/Ghidra/Extensions/sample/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
data/README.txt||GHIDRA||||END|
diff --git a/Ghidra/Features/Base/build.gradle b/Ghidra/Features/Base/build.gradle
index 690f26789e..e7b5fcd547 100644
--- a/Ghidra/Features/Base/build.gradle
+++ b/Ghidra/Features/Base/build.gradle
@@ -1,9 +1,11 @@
+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 Base'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/developerScripts.gradle"
/*
This build file is a bit different than most project build files, as it initializes
@@ -28,10 +30,10 @@ dependencies {
compileOnly "junit:junit:4.12"
// These have abstract test classes and stubs needed by this module
- testCompile project(':Docking').sourceSets.test.output
- testCompile project(':Generic').sourceSets.test.output
- testCompile project(':Project').sourceSets.test.output
- testCompile project(':SoftwareModeling').sourceSets.test.output
+ testCompile project(path: ':Docking', configuration: 'testArtifacts')
+ testCompile project(path: ':Generic', configuration: 'testArtifacts')
+ testCompile project(path: ':Project', configuration: 'testArtifacts')
+ testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts')
javacc 'net.java.dev.javacc:javacc:5.0'
}
@@ -147,7 +149,7 @@ def createTipsHelpFile(input, output) {
Dependency Setup
*/
compileJava.dependsOn buildJavacc
-prepDev.dependsOn buildJavacc
+rootProject.prepDev.dependsOn buildJavacc
// 'indexHelp' is defined in the buildHelp.gradle 'script plugin'
indexHelp.dependsOn generateExtraHelpFiles
diff --git a/Ghidra/Features/Base/certification.manifest b/Ghidra/Features/Base/certification.manifest
index ae72317d3b..cee6ba3941 100644
--- a/Ghidra/Features/Base/certification.manifest
+++ b/Ghidra/Features/Base/certification.manifest
@@ -7,10 +7,8 @@
##MODULE IP: Nuvola Icons - LGPL 2.1
##MODULE IP: Oxygen Icons - LGPL 3.0
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
.gitignore||GHIDRA||||END|
.launch/Ghidra.launch||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ElfFunctionsThatDoNotReturn||GHIDRA||||END|
diff --git a/Ghidra/Features/BytePatterns/build.gradle b/Ghidra/Features/BytePatterns/build.gradle
index d7747808ae..df3b454780 100644
--- a/Ghidra/Features/BytePatterns/build.gradle
+++ b/Ghidra/Features/BytePatterns/build.gradle
@@ -1,8 +1,11 @@
+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 BytePatterns'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Features/BytePatterns/certification.manifest b/Ghidra/Features/BytePatterns/certification.manifest
index 9aee23cb25..cf7fce5f69 100644
--- a/Ghidra/Features/BytePatterns/certification.manifest
+++ b/Ghidra/Features/BytePatterns/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
data/test/FileBitPatternInfoReaderTestFile1.xml||GHIDRA||||END|
diff --git a/Ghidra/Features/ByteViewer/build.gradle b/Ghidra/Features/ByteViewer/build.gradle
index 087d4e76ca..1572d8f7bc 100644
--- a/Ghidra/Features/ByteViewer/build.gradle
+++ b/Ghidra/Features/ByteViewer/build.gradle
@@ -1,8 +1,11 @@
+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 ByteViewer'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-
dependencies {
compile project(':Base')
diff --git a/Ghidra/Features/ByteViewer/certification.manifest b/Ghidra/Features/ByteViewer/certification.manifest
index 809e603f8b..8639408513 100644
--- a/Ghidra/Features/ByteViewer/certification.manifest
+++ b/Ghidra/Features/ByteViewer/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||reviewed||END|
diff --git a/Ghidra/Features/DebugUtils/build.gradle b/Ghidra/Features/DebugUtils/build.gradle
index c7e5b79b3a..258686549f 100644
--- a/Ghidra/Features/DebugUtils/build.gradle
+++ b/Ghidra/Features/DebugUtils/build.gradle
@@ -1,3 +1,7 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Features DebugUtils'
diff --git a/Ghidra/Features/DebugUtils/certification.manifest b/Ghidra/Features/DebugUtils/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Features/DebugUtils/certification.manifest
+++ b/Ghidra/Features/DebugUtils/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Features/Decompiler/build.gradle b/Ghidra/Features/Decompiler/build.gradle
index a9f842b3e6..eac4eb051c 100644
--- a/Ghidra/Features/Decompiler/build.gradle
+++ b/Ghidra/Features/Decompiler/build.gradle
@@ -1,16 +1,21 @@
+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/helpProject.gradle"
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features Decompiler'
-apply from: "$rootProject.projectDir/gradleScripts/nativeBuildProperties.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
+
dependencies {
compile project(':Base')
compile project(':SoftwareModeling')
// include Base src/test/resources when running decompiler integration tests (uses defaultTools)
- integrationTestRuntime project(':Base').sourceSets.test.output
+ integrationTestRuntime project(path: ':Base', configuration: 'testArtifacts')
testCompile "org.jmockit:jmockit:1.44"
helpPath project(path: ":Base", configuration: 'helpPath')
@@ -510,4 +515,24 @@ Task createLexTask(String filename, String binaryName) {
}
}
-
+rootProject.createInstallationZip {
+ dependsOn buildDecompilerDocumentationPdfs
+
+
+ def decompilerPdfZipPath = rootProject.ext.ZIP_DIR_PREFIX + "/docs/languages/"
+
+ // Add decompiler pdf files to zip. If the pdf files do not exist during execution time
+ // (if there was an error or wrong platform), the zip task will move on.
+ buildDecompilerDocumentationPdfs.outputs.each { output ->
+ output.files.each { file ->
+ if (file.name.endsWith("pdf")) {
+ logger.debug("$project.name: Adding Decompiler documentation (if it exists) $file.name to $decompilerPdfZipPath")
+ rootProject.createInstallationZip.from (file) {
+ into {
+ decompilerPdfZipPath
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Ghidra/Features/Decompiler/certification.manifest b/Ghidra/Features/Decompiler/certification.manifest
index e3d3375401..935fa18a79 100644
--- a/Ghidra/Features/Decompiler/certification.manifest
+++ b/Ghidra/Features/Decompiler/certification.manifest
@@ -2,11 +2,8 @@
##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: Oxygen Icons - LGPL 3.0
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-src/decompile/.classpath||GHIDRA||||END|
src/decompile/.cproject||GHIDRA||||END|
src/decompile/.project||GHIDRA||||END|
src/decompile/.settings/org.eclipse.jdt.core.prefs||GHIDRA||||END|
diff --git a/Ghidra/Features/DecompilerDependent/build.gradle b/Ghidra/Features/DecompilerDependent/build.gradle
index 7efb9132e1..f8070d5792 100644
--- a/Ghidra/Features/DecompilerDependent/build.gradle
+++ b/Ghidra/Features/DecompilerDependent/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features DecompilerDependent'
diff --git a/Ghidra/Features/DecompilerDependent/certification.manifest b/Ghidra/Features/DecompilerDependent/certification.manifest
index 76b8c15630..ab3e50857c 100644
--- a/Ghidra/Features/DecompilerDependent/certification.manifest
+++ b/Ghidra/Features/DecompilerDependent/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Features/FileFormats/build.gradle b/Ghidra/Features/FileFormats/build.gradle
index e9d67f79cf..d905851612 100644
--- a/Ghidra/Features/FileFormats/build.gradle
+++ b/Ghidra/Features/FileFormats/build.gradle
@@ -1,9 +1,13 @@
+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 FileFormats'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/developerScripts.gradle"
+
dependencies {
compile project(':Base')
diff --git a/Ghidra/Features/FileFormats/certification.manifest b/Ghidra/Features/FileFormats/certification.manifest
index d9bbfc6a8d..87e9e1800c 100644
--- a/Ghidra/Features/FileFormats/certification.manifest
+++ b/Ghidra/Features/FileFormats/certification.manifest
@@ -6,14 +6,11 @@
##MODULE IP: Jython License
##MODULE IP: LGPL 2.1
##MODULE IP: Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
data/android/eclipse-classpath||GHIDRA||reviewed||END|
data/android/eclipse-project||GHIDRA||reviewed||END|
-data/build.xml||GHIDRA||||END|
data/crypto/README.txt||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/topics/FileFormatsPlugin/FileFormats.html||GHIDRA||||END|
diff --git a/Ghidra/Features/FunctionGraph/build.gradle b/Ghidra/Features/FunctionGraph/build.gradle
index f293e489b9..d21bcf1347 100644
--- a/Ghidra/Features/FunctionGraph/build.gradle
+++ b/Ghidra/Features/FunctionGraph/build.gradle
@@ -1,7 +1,12 @@
+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 Graph FunctionGraph'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
dependencies {
diff --git a/Ghidra/Features/FunctionGraph/certification.manifest b/Ghidra/Features/FunctionGraph/certification.manifest
index cadb696da3..837c247046 100644
--- a/Ghidra/Features/FunctionGraph/certification.manifest
+++ b/Ghidra/Features/FunctionGraph/certification.manifest
@@ -4,8 +4,6 @@
##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: Oxygen Icons - LGPL 3.0
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Features/FunctionGraphDecompilerExtension/build.gradle b/Ghidra/Features/FunctionGraphDecompilerExtension/build.gradle
index 1670c35075..705253752f 100644
--- a/Ghidra/Features/FunctionGraphDecompilerExtension/build.gradle
+++ b/Ghidra/Features/FunctionGraphDecompilerExtension/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features Graph FunctionGraphDecompilerExt'
dependencies {
diff --git a/Ghidra/Features/FunctionGraphDecompilerExtension/certification.manifest b/Ghidra/Features/FunctionGraphDecompilerExtension/certification.manifest
index c1ae4885bf..23bc67e990 100644
--- a/Ghidra/Features/FunctionGraphDecompilerExtension/certification.manifest
+++ b/Ghidra/Features/FunctionGraphDecompilerExtension/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/resources/images/function_graph_code_flow.png||GHIDRA||reviewed||END|
diff --git a/Ghidra/Features/FunctionID/build.gradle b/Ghidra/Features/FunctionID/build.gradle
index 315044f1a8..71eeaddc7b 100644
--- a/Ghidra/Features/FunctionID/build.gradle
+++ b/Ghidra/Features/FunctionID/build.gradle
@@ -1,8 +1,12 @@
+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 FunctionID'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
dependencies {
compile project(":Base")
@@ -172,11 +176,11 @@ task buildFidDocumentationHtml(type: Exec) {
}
}
-// Ensure that unpacked Fid Db's are included in common
-rootProject.assembleCommon.dependsOn(unpackFidDatabases)
+// Ensure that unpacked Fid Db's are included
+rootProject.assembleDistribution.dependsOn(unpackFidDatabases)
// Ensure that Fidb's are unpacked in development
-prepDev.dependsOn unpackFidDatabases
+rootProject.prepDev.dependsOn unpackFidDatabases
//********************************
// Packed Database Unpack Methods
diff --git a/Ghidra/Features/FunctionID/certification.manifest b/Ghidra/Features/FunctionID/certification.manifest
index 0d0a74c577..68429c3baf 100644
--- a/Ghidra/Features/FunctionID/certification.manifest
+++ b/Ghidra/Features/FunctionID/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: BSD
##MODULE IP: Nuvola Icons - LGPL 2.1
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/building_fid.txt||GHIDRA|exclude|||END|
diff --git a/Ghidra/Features/GhidraServer/build.gradle b/Ghidra/Features/GhidraServer/build.gradle
index d072339551..1d89b58e34 100644
--- a/Ghidra/Features/GhidraServer/build.gradle
+++ b/Ghidra/Features/GhidraServer/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features GhidraServer'
def yajswRelease = "yajsw-stable-12.12"
@@ -85,14 +90,14 @@ task generateGhidraServerClasspath {
}
/**
- * The classpath.frag file created below needs to be placed in the common folder under the root
+ * The classpath.frag file created below needs to be placed in the staging folder under the root
* path of this project.
*
* Note that we use 'this.project' to reference the GhidraServer project - this is because
* inside the closure, 'project' refers to the root project, while 'this' refers to
* GhidraServer.
*/
-rootProject.assembleCommon {
+rootProject.assembleDistribution {
into (getZipPath(this.project) + "/data") {
with yajswCopySpec
from generateGhidraServerClasspath
@@ -145,8 +150,8 @@ task generateDevGhidraServerClasspath {
* We want the two main tasks in this build file to be run at the appropriate time; the
* dev task should be run during prepDev; the other should be run during the build
*****************************************************************************************/
-prepDev.dependsOn(generateDevGhidraServerClasspath)
-prepDev.dependsOn(yajswDevUnpack)
+rootProject.prepDev.dependsOn(generateDevGhidraServerClasspath)
+rootProject.prepDev.dependsOn(yajswDevUnpack)
//compileJava.dependsOn(generateGhidraServerClasspath)
diff --git a/Ghidra/Features/GhidraServer/certification.manifest b/Ghidra/Features/GhidraServer/certification.manifest
index 0c4dbda382..74fa0b1aa0 100644
--- a/Ghidra/Features/GhidraServer/certification.manifest
+++ b/Ghidra/Features/GhidraServer/certification.manifest
@@ -2,8 +2,6 @@
##MODULE IP: Apache License 2.0
##MODULE IP: LGPL 2.1
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/jaas-modules-src-1.0.3.zip||LGPL 2.1|||File corresponds to original distribution with all binary product files removed.|END|
diff --git a/Ghidra/Features/GnuDemangler/build.gradle b/Ghidra/Features/GnuDemangler/build.gradle
index 072e65099d..45eb344084 100644
--- a/Ghidra/Features/GnuDemangler/build.gradle
+++ b/Ghidra/Features/GnuDemangler/build.gradle
@@ -1,6 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features GnuDemangler'
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
+
dependencies {
compile project(":Base")
diff --git a/Ghidra/Features/GnuDemangler/certification.manifest b/Ghidra/Features/GnuDemangler/certification.manifest
index 11508dc37f..400bcc053d 100644
--- a/Ghidra/Features/GnuDemangler/certification.manifest
+++ b/Ghidra/Features/GnuDemangler/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: BSD
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/test/resources/ghidra/app/util/demangler/gnu_mangled_names.txt||GHIDRA||reviewed||END|
diff --git a/Ghidra/Features/GraphFunctionCalls/build.gradle b/Ghidra/Features/GraphFunctionCalls/build.gradle
index 34108676bf..ef8e24e133 100644
--- a/Ghidra/Features/GraphFunctionCalls/build.gradle
+++ b/Ghidra/Features/GraphFunctionCalls/build.gradle
@@ -1,7 +1,12 @@
+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 Graph FunctionCalls'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
// Note: this module's name is 'GraphFunctionCalls'
dependencies {
@@ -15,7 +20,7 @@ dependencies {
helpPath project(path: ":FunctionGraph", configuration: 'helpPath')
// These have abstract test classes and stubs needed by this module
- testCompile project(':Project').sourceSets.test.output
- testCompile project(':SoftwareModeling').sourceSets.test.output
+ testCompile project(path: ':Project', configuration: 'testArtifacts')
+ testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts')
}
diff --git a/Ghidra/Features/GraphFunctionCalls/certification.manifest b/Ghidra/Features/GraphFunctionCalls/certification.manifest
index dd164128b1..a3e271c0d9 100644
--- a/Ghidra/Features/GraphFunctionCalls/certification.manifest
+++ b/Ghidra/Features/GraphFunctionCalls/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
diff --git a/Ghidra/Features/MicrosoftCodeAnalyzer/build.gradle b/Ghidra/Features/MicrosoftCodeAnalyzer/build.gradle
index 270f6296b5..36d50efec7 100644
--- a/Ghidra/Features/MicrosoftCodeAnalyzer/build.gradle
+++ b/Ghidra/Features/MicrosoftCodeAnalyzer/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features MicrosoftCodeAnalyzer'
dependencies {
diff --git a/Ghidra/Features/MicrosoftCodeAnalyzer/certification.manifest b/Ghidra/Features/MicrosoftCodeAnalyzer/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Features/MicrosoftCodeAnalyzer/certification.manifest
+++ b/Ghidra/Features/MicrosoftCodeAnalyzer/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Features/MicrosoftDemangler/build.gradle b/Ghidra/Features/MicrosoftDemangler/build.gradle
index f0f0c9a2c3..ab96797b2a 100644
--- a/Ghidra/Features/MicrosoftDemangler/build.gradle
+++ b/Ghidra/Features/MicrosoftDemangler/build.gradle
@@ -1,7 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features MicrosoftDemangler'
-apply from: "$rootProject.projectDir/gradleScripts/developerScripts.gradle"
dependencies {
compile project(":Base")
diff --git a/Ghidra/Features/MicrosoftDemangler/certification.manifest b/Ghidra/Features/MicrosoftDemangler/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Features/MicrosoftDemangler/certification.manifest
+++ b/Ghidra/Features/MicrosoftDemangler/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Features/MicrosoftDmang/build.gradle b/Ghidra/Features/MicrosoftDmang/build.gradle
index 304809c4c1..2274d04c30 100644
--- a/Ghidra/Features/MicrosoftDmang/build.gradle
+++ b/Ghidra/Features/MicrosoftDmang/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features MicrosoftDemang'
project.ext.excludeFromParallelTests = true
diff --git a/Ghidra/Features/MicrosoftDmang/certification.manifest b/Ghidra/Features/MicrosoftDmang/certification.manifest
index fd2bb485bb..8330c8c6dd 100644
--- a/Ghidra/Features/MicrosoftDmang/certification.manifest
+++ b/Ghidra/Features/MicrosoftDmang/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/java/mdemangler/MDMang_README.txt||GHIDRA||||END|
diff --git a/Ghidra/Features/PDB/build.gradle b/Ghidra/Features/PDB/build.gradle
index 22e8907e13..f435f6a20a 100644
--- a/Ghidra/Features/PDB/build.gradle
+++ b/Ghidra/Features/PDB/build.gradle
@@ -1,10 +1,12 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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 plugin: 'eclipse'
+
eclipse.project.name = 'Features PDB'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/nativeBuildProperties.gradle"
/*********************************************************************************
* Build dependencies
@@ -23,7 +25,7 @@ dependencies {
* inside the closure, 'project' refers to the root project, while 'this' refers to
* PDB.
*/
-rootProject.assembleCommon {
+rootProject.assembleDistribution {
into (getZipPath(this.project) + "/src/pdb") {
from projectDir.toString() + "/src/pdb"
}
diff --git a/Ghidra/Features/PDB/certification.manifest b/Ghidra/Features/PDB/certification.manifest
index 6f5d6ae626..38b5b13384 100644
--- a/Ghidra/Features/PDB/certification.manifest
+++ b/Ghidra/Features/PDB/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/global/docs/README_PDB.html||GHIDRA||||END|
diff --git a/Ghidra/Features/ProgramDiff/build.gradle b/Ghidra/Features/ProgramDiff/build.gradle
index f9a7d5b9a3..bc6c9a3c5e 100644
--- a/Ghidra/Features/ProgramDiff/build.gradle
+++ b/Ghidra/Features/ProgramDiff/build.gradle
@@ -1,7 +1,12 @@
+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 ProgramDiff'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
dependencies {
compile project(":Base")
diff --git a/Ghidra/Features/ProgramDiff/certification.manifest b/Ghidra/Features/ProgramDiff/certification.manifest
index 322215bd0d..cd7222a848 100644
--- a/Ghidra/Features/ProgramDiff/certification.manifest
+++ b/Ghidra/Features/ProgramDiff/certification.manifest
@@ -1,12 +1,10 @@
##VERSION: 2.0
-##MODULE IP: Nuvola Icons - LGPL 2.1
-##MODULE IP: Modified Nuvola Icons - LGPL 2.1
-##MODULE IP: Tango Icons - Public Domain
+##MODULE IP: Crystal Clear Icons - LGPL 2.1
##MODULE IP: FAMFAMFAM Icons - CC 2.5
+##MODULE IP: Modified Nuvola Icons - LGPL 2.1
+##MODULE IP: Nuvola Icons - LGPL 2.1
##MODULE IP: Oxygen Icons - LGPL 3.0
-##MODULE IP: Crystal Clear Icons - LGPL 2.1
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
+##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
diff --git a/Ghidra/Features/Python/build.gradle b/Ghidra/Features/Python/build.gradle
index 27279c69d4..ffe7eaf0dd 100644
--- a/Ghidra/Features/Python/build.gradle
+++ b/Ghidra/Features/Python/build.gradle
@@ -1,7 +1,12 @@
+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'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
def JYTHON = "org.python:jython-standalone:2.7.1"
def JYTHON_DIR = "jython-2.7.1"
@@ -40,6 +45,6 @@ task pythonSrcCopy(type: Copy) {
}
// Ensure that Jython is usable in development xx
-prepDev.dependsOn jythonUnpack
+rootProject.prepDev.dependsOn jythonUnpack
jar.dependsOn jythonUnpack
jar.dependsOn pythonSrcCopy
diff --git a/Ghidra/Features/Python/certification.manifest b/Ghidra/Features/Python/certification.manifest
index b98a14ec9a..e9152e4cfa 100644
--- a/Ghidra/Features/Python/certification.manifest
+++ b/Ghidra/Features/Python/certification.manifest
@@ -1,8 +1,6 @@
##VERSION: 2.0
##MODULE IP: Jython License
##MODULE IP: LGPL 2.1
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
ghidra_scripts/AddCommentToProgramScriptPy.py||GHIDRA||||END|
diff --git a/Ghidra/Features/Recognizers/build.gradle b/Ghidra/Features/Recognizers/build.gradle
index a5da9d6d21..aa500309c1 100644
--- a/Ghidra/Features/Recognizers/build.gradle
+++ b/Ghidra/Features/Recognizers/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Features Recognizers'
dependencies {
diff --git a/Ghidra/Features/Recognizers/certification.manifest b/Ghidra/Features/Recognizers/certification.manifest
index 22d55aad62..f71f17ca25 100644
--- a/Ghidra/Features/Recognizers/certification.manifest
+++ b/Ghidra/Features/Recognizers/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Features/SourceCodeLookup/build.gradle b/Ghidra/Features/SourceCodeLookup/build.gradle
index fd083ba652..a7af785046 100644
--- a/Ghidra/Features/SourceCodeLookup/build.gradle
+++ b/Ghidra/Features/SourceCodeLookup/build.gradle
@@ -1,7 +1,11 @@
+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 SourceCodeLookup'
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
+eclipse.project.name = 'Features SourceCodeLookup'
dependencies {
compile project(":Base")
diff --git a/Ghidra/Features/SourceCodeLookup/certification.manifest b/Ghidra/Features/SourceCodeLookup/certification.manifest
index c75e0db37e..74b0c57419 100644
--- a/Ghidra/Features/SourceCodeLookup/certification.manifest
+++ b/Ghidra/Features/SourceCodeLookup/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: Oxygen Icons - LGPL 3.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
diff --git a/Ghidra/Features/VersionTracking/build.gradle b/Ghidra/Features/VersionTracking/build.gradle
index 6cef0b8f18..528457992d 100644
--- a/Ghidra/Features/VersionTracking/build.gradle
+++ b/Ghidra/Features/VersionTracking/build.gradle
@@ -1,12 +1,14 @@
+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 VersionTracking'
project.ext.excludeFromParallelIntegrationTests = true
-apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/developerScripts.gradle"
-
dependencies {
compile project(":Base")
diff --git a/Ghidra/Features/VersionTracking/certification.manifest b/Ghidra/Features/VersionTracking/certification.manifest
index 49c95bcef9..8a76937bd3 100644
--- a/Ghidra/Features/VersionTracking/certification.manifest
+++ b/Ghidra/Features/VersionTracking/certification.manifest
@@ -3,8 +3,6 @@
##MODULE IP: Nuvola Icons - LGPL 2.1
##MODULE IP: Oxygen Icons - LGPL 3.0
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||reviewed||END|
diff --git a/Ghidra/Framework/DB/build.gradle b/Ghidra/Framework/DB/build.gradle
index 4a6255691c..5b9a44c1b1 100644
--- a/Ghidra/Framework/DB/build.gradle
+++ b/Ghidra/Framework/DB/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework DB'
dependencies {
diff --git a/Ghidra/Framework/DB/certification.manifest b/Ghidra/Framework/DB/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Framework/DB/certification.manifest
+++ b/Ghidra/Framework/DB/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Framework/Demangler/build.gradle b/Ghidra/Framework/Demangler/build.gradle
index 6c43516ea0..4614e824cc 100644
--- a/Ghidra/Framework/Demangler/build.gradle
+++ b/Ghidra/Framework/Demangler/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Demangler'
dependencies {
diff --git a/Ghidra/Framework/Demangler/certification.manifest b/Ghidra/Framework/Demangler/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Framework/Demangler/certification.manifest
+++ b/Ghidra/Framework/Demangler/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Framework/Docking/build.gradle b/Ghidra/Framework/Docking/build.gradle
index 3571443c2d..84558ad5f6 100644
--- a/Ghidra/Framework/Docking/build.gradle
+++ b/Ghidra/Framework/Docking/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Docking'
dependencies {
@@ -13,8 +18,7 @@ dependencies {
// include code from src/test in Generic
- testCompile project(':Generic').sourceSets.test.output
-
+ testCompile project(path: ':Generic', configuration: 'testArtifacts')
compileOnly "junit:junit:4.12"
}
diff --git a/Ghidra/Framework/Docking/certification.manifest b/Ghidra/Framework/Docking/certification.manifest
index ea40c518ea..09bc1820c1 100644
--- a/Ghidra/Framework/Docking/certification.manifest
+++ b/Ghidra/Framework/Docking/certification.manifest
@@ -1,15 +1,13 @@
##VERSION: 2.0
##MODULE IP: BSD
+##MODULE IP: Crystal Clear Icons - LGPL 2.1
+##MODULE IP: FAMFAMFAM Icons - CC 2.5
##MODULE IP: GPL 2 With Classpath Exception
-##MODULE IP: Nuvola Icons - LGPL 2.1
+##MODULE IP: LGPL 2.1
##MODULE IP: Modified Nuvola Icons - LGPL 2.1
-##MODULE IP: Tango Icons - Public Domain
-##MODULE IP: FAMFAMFAM Icons - CC 2.5
+##MODULE IP: Nuvola Icons - LGPL 2.1
##MODULE IP: Oxygen Icons - LGPL 3.0
-##MODULE IP: Crystal Clear Icons - LGPL 2.1
-##MODULE IP: LGPL 2.1
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
+##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
@@ -46,7 +44,6 @@ src/main/resources/images/eatbits4.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits5.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits6.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits7.png||GHIDRA||reviewed||END|
-src/main/resources/images/edit-clear-reverse.png||Oxygen Icons - LGPL 3.0|||mirror image of edit-clear.png|END|
src/main/resources/images/edit-clear.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/edit-cut22.png||Tango Icons - Public Domain|||original name edit-cut.png in tango 22x22|END|
src/main/resources/images/edit-delete.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
diff --git a/Ghidra/Framework/FileSystem/build.gradle b/Ghidra/Framework/FileSystem/build.gradle
index 5e2254a79c..d06d61d66d 100644
--- a/Ghidra/Framework/FileSystem/build.gradle
+++ b/Ghidra/Framework/FileSystem/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework FileSystem'
dependencies {
diff --git a/Ghidra/Framework/FileSystem/certification.manifest b/Ghidra/Framework/FileSystem/certification.manifest
index 98eac59161..5fc5d93192 100644
--- a/Ghidra/Framework/FileSystem/certification.manifest
+++ b/Ghidra/Framework/FileSystem/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: Christian Plattner
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/java/ghidra/framework/client/package.html||GHIDRA||reviewed||END|
diff --git a/Ghidra/Framework/Generic/build.gradle b/Ghidra/Framework/Generic/build.gradle
index 0fd371c61b..89ee1d0a8f 100644
--- a/Ghidra/Framework/Generic/build.gradle
+++ b/Ghidra/Framework/Generic/build.gradle
@@ -1,6 +1,11 @@
import org.gradle.plugins.ide.eclipse.model.Container;
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Generic'
dependencies {
diff --git a/Ghidra/Framework/Generic/certification.manifest b/Ghidra/Framework/Generic/certification.manifest
index f6b8cb7877..a4f9a3084b 100644
--- a/Ghidra/Framework/Generic/certification.manifest
+++ b/Ghidra/Framework/Generic/certification.manifest
@@ -11,7 +11,6 @@
##MODULE IP: Tango Icons - Public Domain
.classpath||GHIDRA||||END|
.gitignore||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Framework/Graph/build.gradle b/Ghidra/Framework/Graph/build.gradle
index 8b1e97128c..6f1bbb008d 100644
--- a/Ghidra/Framework/Graph/build.gradle
+++ b/Ghidra/Framework/Graph/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Graph'
dependencies {
diff --git a/Ghidra/Framework/Graph/certification.manifest b/Ghidra/Framework/Graph/certification.manifest
index 28e4f797ca..48f4f88706 100644
--- a/Ghidra/Framework/Graph/certification.manifest
+++ b/Ghidra/Framework/Graph/certification.manifest
@@ -1,9 +1,7 @@
##VERSION: 2.0
##MODULE IP: BSD
-##MODULE IP: Oxygen Icons - LGPL 3.0
##MODULE IP: FAMFAMFAM Icons - CC 2.5
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
+##MODULE IP: Oxygen Icons - LGPL 3.0
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/main/docs/README.txt||GHIDRA||||END|
diff --git a/Ghidra/Framework/Help/build.gradle b/Ghidra/Framework/Help/build.gradle
index 4f293f07d7..8c093c2fd0 100644
--- a/Ghidra/Framework/Help/build.gradle
+++ b/Ghidra/Framework/Help/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Help'
dependencies {
@@ -8,4 +13,3 @@ dependencies {
// compile name:'jh' - provided by Docking
}
-
diff --git a/Ghidra/Framework/Help/certification.manifest b/Ghidra/Framework/Help/certification.manifest
index 38dd7a8b2c..c278982bf7 100644
--- a/Ghidra/Framework/Help/certification.manifest
+++ b/Ghidra/Framework/Help/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.files/buildLocalHelp.xml||GHIDRA||||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Framework/Project/build.gradle b/Ghidra/Framework/Project/build.gradle
index 97401d3013..a317aa2806 100644
--- a/Ghidra/Framework/Project/build.gradle
+++ b/Ghidra/Framework/Project/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Project'
dependencies {
diff --git a/Ghidra/Framework/Project/certification.manifest b/Ghidra/Framework/Project/certification.manifest
index aec32d4769..13d918979e 100644
--- a/Ghidra/Framework/Project/certification.manifest
+++ b/Ghidra/Framework/Project/certification.manifest
@@ -1,12 +1,10 @@
##VERSION: 2.0
##MODULE IP: Apache License 2.0
-##MODULE IP: Modified Nuvola Icons - LGPL 2.1
-##MODULE IP: Tango Icons - Public Domain
+##MODULE IP: Crystal Clear Icons - LGPL 2.1
##MODULE IP: FAMFAMFAM Icons - CC 2.5
+##MODULE IP: Modified Nuvola Icons - LGPL 2.1
##MODULE IP: Oxygen Icons - LGPL 3.0
-##MODULE IP: Crystal Clear Icons - LGPL 2.1
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
+##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Framework/SoftwareModeling/build.gradle b/Ghidra/Framework/SoftwareModeling/build.gradle
index afcc62f929..aba2fc1100 100644
--- a/Ghidra/Framework/SoftwareModeling/build.gradle
+++ b/Ghidra/Framework/SoftwareModeling/build.gradle
@@ -1,8 +1,17 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework SoftwareModeling'
apply plugin: 'antlr'
+// make sure antlr code gets built during prepdev so that the directories are created and
+// eclipse doesn't complain about missing src directories.
+rootProject.prepDev.dependsOn compileJava
+
dependencies {
compile project(':Generic')
compile project(':FileSystem')
@@ -21,11 +30,7 @@ dependencies {
// Must specify the specific antlr implementation to use or it will default to trying to find
// version 2.7.7 (which we don't have)
antlr "org.antlr:antlr:3.5.2"
-}
-
-// Define classpath needed to execute sleigh compiler during development
-// (see gradleScripts/processorUtils.gradle)
-ext.sleighDevClasspath = project.sourceSets.main.runtimeClasspath.collect { it.absolutePath }.join(':')
+}
def genSrcDir = 'generated-src/antlr/main'
generateGrammarSource {
diff --git a/Ghidra/Framework/SoftwareModeling/certification.manifest b/Ghidra/Framework/SoftwareModeling/certification.manifest
index 1068258d71..03c810cd8f 100644
--- a/Ghidra/Framework/SoftwareModeling/certification.manifest
+++ b/Ghidra/Framework/SoftwareModeling/certification.manifest
@@ -2,8 +2,6 @@
##MODULE IP: BSD
##MODULE IP: Creative Commons Attribution 2.5
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
Sleigh.launch||GHIDRA||||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Framework/Utility/build.gradle b/Ghidra/Framework/Utility/build.gradle
index 281ec9098f..aec793639f 100644
--- a/Ghidra/Framework/Utility/build.gradle
+++ b/Ghidra/Framework/Utility/build.gradle
@@ -1,4 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Framework Utility'
// Restrict to Java 1.8 for compatibility with the GhidraDev Eclipse plugin.
diff --git a/Ghidra/Framework/Utility/certification.manifest b/Ghidra/Framework/Utility/certification.manifest
index 7af408923b..e9c2fe2942 100644
--- a/Ghidra/Framework/Utility/certification.manifest
+++ b/Ghidra/Framework/Utility/certification.manifest
@@ -1,5 +1,3 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||reviewed||END|
build.gradle||GHIDRA||||END|
diff --git a/Ghidra/Processors/6502/build.gradle b/Ghidra/Processors/6502/build.gradle
index 0d5144888f..19922fb763 100644
--- a/Ghidra/Processors/6502/build.gradle
+++ b/Ghidra/Processors/6502/build.gradle
@@ -1,8 +1,7 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Processors 6502'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
diff --git a/Ghidra/Processors/6502/certification.manifest b/Ghidra/Processors/6502/certification.manifest
index f27ee22f5b..5d52c8a399 100644
--- a/Ghidra/Processors/6502/certification.manifest
+++ b/Ghidra/Processors/6502/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/6502.cspec||GHIDRA||||END|
data/languages/6502.ldefs||GHIDRA||||END|
data/languages/6502.pspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/68000/build.gradle b/Ghidra/Processors/68000/build.gradle
index 413198a1f2..4a4f702375 100644
--- a/Ghidra/Processors/68000/build.gradle
+++ b/Ghidra/Processors/68000/build.gradle
@@ -1,10 +1,13 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
+
+
eclipse.project.name = 'Processors 68000'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/68000/certification.manifest b/Ghidra/Processors/68000/certification.manifest
index 6b4822bf15..a6e3027736 100644
--- a/Ghidra/Processors/68000/certification.manifest
+++ b/Ghidra/Processors/68000/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/68000.cspec||GHIDRA||||END|
data/languages/68000.ldefs||GHIDRA||||END|
data/languages/68000.opinion||GHIDRA||||END|
diff --git a/Ghidra/Processors/6805/build.gradle b/Ghidra/Processors/6805/build.gradle
index 6eb07b44e4..6410b3cefd 100644
--- a/Ghidra/Processors/6805/build.gradle
+++ b/Ghidra/Processors/6805/build.gradle
@@ -1,8 +1,6 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
-eclipse.project.name = 'Processors 6805'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
+eclipse.project.name = 'Processors 6805'
diff --git a/Ghidra/Processors/6805/certification.manifest b/Ghidra/Processors/6805/certification.manifest
index 381dc2af34..b31dfa76a8 100644
--- a/Ghidra/Processors/6805/certification.manifest
+++ b/Ghidra/Processors/6805/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/6805.cspec||GHIDRA||||END|
data/languages/6805.ldefs||GHIDRA||||END|
data/languages/6805.pspec||GHIDRA||reviewed||END|
diff --git a/Ghidra/Processors/8051/build.gradle b/Ghidra/Processors/8051/build.gradle
index f382421095..9d6648f0d6 100644
--- a/Ghidra/Processors/8051/build.gradle
+++ b/Ghidra/Processors/8051/build.gradle
@@ -1,11 +1,10 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
+apply plugin: 'java'
+
eclipse.project.name = 'Processors 8051'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/8051/certification.manifest b/Ghidra/Processors/8051/certification.manifest
index c0f3682e4d..6a6e7a6b09 100644
--- a/Ghidra/Processors/8051/certification.manifest
+++ b/Ghidra/Processors/8051/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/80251.cspec||GHIDRA||||END|
data/languages/80251.pspec||GHIDRA||reviewed||END|
data/languages/80251.sinc||GHIDRA||||END|
diff --git a/Ghidra/Processors/8085/build.gradle b/Ghidra/Processors/8085/build.gradle
index a84347fcb5..38b2f7e46c 100644
--- a/Ghidra/Processors/8085/build.gradle
+++ b/Ghidra/Processors/8085/build.gradle
@@ -1,7 +1,5 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors 8085'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
diff --git a/Ghidra/Processors/8085/certification.manifest b/Ghidra/Processors/8085/certification.manifest
index 95319725a5..ea3416f72a 100644
--- a/Ghidra/Processors/8085/certification.manifest
+++ b/Ghidra/Processors/8085/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/8085.cspec||GHIDRA||||END|
data/languages/8085.ldefs||GHIDRA||reviewed||END|
data/languages/8085.pspec||GHIDRA||reviewed||END|
diff --git a/Ghidra/Processors/AARCH64/build.gradle b/Ghidra/Processors/AARCH64/build.gradle
index 56472c0acd..b581cbf7f4 100644
--- a/Ghidra/Processors/AARCH64/build.gradle
+++ b/Ghidra/Processors/AARCH64/build.gradle
@@ -1,10 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
-eclipse.project.name = 'Processors AARCH64'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
+eclipse.project.name = 'Processors AARCH64'
sleighCompile {
args '-l'
diff --git a/Ghidra/Processors/AARCH64/certification.manifest b/Ghidra/Processors/AARCH64/certification.manifest
index 3010597841..bbdc9d7581 100644
--- a/Ghidra/Processors/AARCH64/certification.manifest
+++ b/Ghidra/Processors/AARCH64/certification.manifest
@@ -1,10 +1,7 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/aarch64-pltThunks.xml||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/AARCH64.cspec||GHIDRA||||END|
data/languages/AARCH64.dwarf||GHIDRA||||END|
data/languages/AARCH64.ldefs||GHIDRA||||END|
diff --git a/Ghidra/Processors/ARM/build.gradle b/Ghidra/Processors/ARM/build.gradle
index 7f0dd6b36a..8d5255a939 100644
--- a/Ghidra/Processors/ARM/build.gradle
+++ b/Ghidra/Processors/ARM/build.gradle
@@ -1,11 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors ARM'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-
dependencies {
compile project(':Base')
}
diff --git a/Ghidra/Processors/ARM/certification.manifest b/Ghidra/Processors/ARM/certification.manifest
index 8b977bb082..bc46a068e8 100644
--- a/Ghidra/Processors/ARM/certification.manifest
+++ b/Ghidra/Processors/ARM/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/ARM.cspec||GHIDRA||||END|
data/languages/ARM.dwarf||GHIDRA||||END|
data/languages/ARM.ldefs||GHIDRA||||END|
diff --git a/Ghidra/Processors/Atmel/build.gradle b/Ghidra/Processors/Atmel/build.gradle
index a8e1ecfc80..fdc360695f 100644
--- a/Ghidra/Processors/Atmel/build.gradle
+++ b/Ghidra/Processors/Atmel/build.gradle
@@ -1,11 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors Atmel'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-
dependencies {
compile project(':Base')
}
diff --git a/Ghidra/Processors/Atmel/certification.manifest b/Ghidra/Processors/Atmel/certification.manifest
index f704bcdcf8..c2b5e2c921 100644
--- a/Ghidra/Processors/Atmel/certification.manifest
+++ b/Ghidra/Processors/Atmel/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/atmega256.pspec||GHIDRA||||END|
data/languages/avr32.opinion||GHIDRA||||END|
data/languages/avr32a.cspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/CR16/build.gradle b/Ghidra/Processors/CR16/build.gradle
index 0c389bb049..9be96730e1 100644
--- a/Ghidra/Processors/CR16/build.gradle
+++ b/Ghidra/Processors/CR16/build.gradle
@@ -1,12 +1,8 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors CR16'
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-
-dependencies {
- compile project(':Base')
-}
+
+
+
diff --git a/Ghidra/Processors/CR16/certification.manifest b/Ghidra/Processors/CR16/certification.manifest
index 2cedc70921..e0749c9be4 100644
--- a/Ghidra/Processors/CR16/certification.manifest
+++ b/Ghidra/Processors/CR16/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/build.xml||GHIDRA||||END|
diff --git a/Ghidra/Processors/DATA/build.gradle b/Ghidra/Processors/DATA/build.gradle
index b8b174ac15..c284bfba59 100644
--- a/Ghidra/Processors/DATA/build.gradle
+++ b/Ghidra/Processors/DATA/build.gradle
@@ -1,12 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors DATA'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
-
dependencies {
compile project(':Base')
compile project(':SoftwareModeling')
diff --git a/Ghidra/Processors/DATA/certification.manifest b/Ghidra/Processors/DATA/certification.manifest
index ed514bc912..6ea30740ec 100644
--- a/Ghidra/Processors/DATA/certification.manifest
+++ b/Ghidra/Processors/DATA/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/data-be-64.slaspec||GHIDRA||||END|
data/languages/data-le-64.slaspec||GHIDRA||||END|
data/languages/data-ptr16.cspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/Dalvik/build.gradle b/Ghidra/Processors/Dalvik/build.gradle
index 3f71e5f7dc..153d8ad9d6 100644
--- a/Ghidra/Processors/Dalvik/build.gradle
+++ b/Ghidra/Processors/Dalvik/build.gradle
@@ -1,10 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors Dalvik'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
sleighCompile {
args '-l'
diff --git a/Ghidra/Processors/JVM/build.gradle b/Ghidra/Processors/JVM/build.gradle
index 5a7263391c..c5386f521c 100644
--- a/Ghidra/Processors/JVM/build.gradle
+++ b/Ghidra/Processors/JVM/build.gradle
@@ -1,10 +1,14 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors JVM'
/*********************************************************************************
* Imports
*********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/JVM/certification.manifest b/Ghidra/Processors/JVM/certification.manifest
index 0d1bf101e7..bdccd4e08c 100644
--- a/Ghidra/Processors/JVM/certification.manifest
+++ b/Ghidra/Processors/JVM/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
diff --git a/Ghidra/Processors/MIPS/build.gradle b/Ghidra/Processors/MIPS/build.gradle
index d652be5c24..e27b475e1f 100644
--- a/Ghidra/Processors/MIPS/build.gradle
+++ b/Ghidra/Processors/MIPS/build.gradle
@@ -1,11 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors MIPS'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-
dependencies {
compile project(':Base')
}
diff --git a/Ghidra/Processors/MIPS/certification.manifest b/Ghidra/Processors/MIPS/certification.manifest
index 35837c916a..7b7adb054a 100644
--- a/Ghidra/Processors/MIPS/certification.manifest
+++ b/Ghidra/Processors/MIPS/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/MIPS.opinion||GHIDRA||||END|
data/languages/mips.dwarf||GHIDRA||||END|
data/languages/mips.ldefs||GHIDRA||||END|
diff --git a/Ghidra/Processors/PA-RISC/build.gradle b/Ghidra/Processors/PA-RISC/build.gradle
index dc7e393e6c..469e3de76f 100644
--- a/Ghidra/Processors/PA-RISC/build.gradle
+++ b/Ghidra/Processors/PA-RISC/build.gradle
@@ -1,7 +1,5 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors PA-RISC'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
diff --git a/Ghidra/Processors/PA-RISC/certification.manifest b/Ghidra/Processors/PA-RISC/certification.manifest
index 12808049aa..c61d4e2694 100644
--- a/Ghidra/Processors/PA-RISC/certification.manifest
+++ b/Ghidra/Processors/PA-RISC/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/pa-risc.ldefs||GHIDRA||||END|
data/languages/pa-risc.opinion||GHIDRA||||END|
data/languages/pa-risc.sinc||GHIDRA||||END|
diff --git a/Ghidra/Processors/PIC/build.gradle b/Ghidra/Processors/PIC/build.gradle
index 474a3bce5e..035249f479 100644
--- a/Ghidra/Processors/PIC/build.gradle
+++ b/Ghidra/Processors/PIC/build.gradle
@@ -1,11 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors PIC'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
-apply from: "$rootProject.projectDir/gradleScripts/ghidraScripts.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/PIC/certification.manifest b/Ghidra/Processors/PIC/certification.manifest
index 236d26a9ed..458cac2366 100644
--- a/Ghidra/Processors/PIC/certification.manifest
+++ b/Ghidra/Processors/PIC/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/PIC24.cspec||GHIDRA||||END|
data/languages/PIC24.ldefs||GHIDRA||||END|
data/languages/PIC24.opinion||GHIDRA||||END|
diff --git a/Ghidra/Processors/PowerPC/build.gradle b/Ghidra/Processors/PowerPC/build.gradle
index 233b3d84d7..234b8724b9 100644
--- a/Ghidra/Processors/PowerPC/build.gradle
+++ b/Ghidra/Processors/PowerPC/build.gradle
@@ -1,10 +1,12 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Processors PowerPC'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/PowerPC/certification.manifest b/Ghidra/Processors/PowerPC/certification.manifest
index b65f30c14c..9ec01974b6 100644
--- a/Ghidra/Processors/PowerPC/certification.manifest
+++ b/Ghidra/Processors/PowerPC/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/4xx.sinc||GHIDRA||||END|
data/languages/FPRC.sinc||GHIDRA||||END|
data/languages/PowerPC.opinion||GHIDRA||||END|
diff --git a/Ghidra/Processors/Sparc/build.gradle b/Ghidra/Processors/Sparc/build.gradle
index 6b26e4151d..c7cdb84a55 100644
--- a/Ghidra/Processors/Sparc/build.gradle
+++ b/Ghidra/Processors/Sparc/build.gradle
@@ -1,10 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors Sparc'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/Sparc/certification.manifest b/Ghidra/Processors/Sparc/certification.manifest
index f1b5dd3b91..27e7452c7f 100644
--- a/Ghidra/Processors/Sparc/certification.manifest
+++ b/Ghidra/Processors/Sparc/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/Sparc.opinion||GHIDRA||||END|
data/languages/SparcV9.ldefs||GHIDRA||||END|
data/languages/SparcV9.pspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/TI_MSP430/build.gradle b/Ghidra/Processors/TI_MSP430/build.gradle
index 1920ad4b4f..1a7595747d 100644
--- a/Ghidra/Processors/TI_MSP430/build.gradle
+++ b/Ghidra/Processors/TI_MSP430/build.gradle
@@ -1,7 +1,6 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
+
eclipse.project.name = 'Processors TI_MSP430'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
diff --git a/Ghidra/Processors/TI_MSP430/certification.manifest b/Ghidra/Processors/TI_MSP430/certification.manifest
index aafbc8b3b2..9d0f42245b 100644
--- a/Ghidra/Processors/TI_MSP430/certification.manifest
+++ b/Ghidra/Processors/TI_MSP430/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/TI430Common.sinc||GHIDRA||||END|
data/languages/TI430X.sinc||GHIDRA||||END|
data/languages/TI_MSP430.cspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/Toy/build.gradle b/Ghidra/Processors/Toy/build.gradle
index 0b146230e4..b0dda1d293 100644
--- a/Ghidra/Processors/Toy/build.gradle
+++ b/Ghidra/Processors/Toy/build.gradle
@@ -1,10 +1,9 @@
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors Toy'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/Toy/certification.manifest b/Ghidra/Processors/Toy/certification.manifest
index 754975ce88..ab0f15b05a 100644
--- a/Ghidra/Processors/Toy/certification.manifest
+++ b/Ghidra/Processors/Toy/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/old/ToyV00BE64.lang||GHIDRA||||END|
data/languages/old/ToyV0BE64.trans||GHIDRA||||END|
data/languages/old/ToyV0LE64.lang||GHIDRA||||END|
diff --git a/Ghidra/Processors/Z80/build.gradle b/Ghidra/Processors/Z80/build.gradle
index b4a1db439b..e8e3ba898e 100644
--- a/Ghidra/Processors/Z80/build.gradle
+++ b/Ghidra/Processors/Z80/build.gradle
@@ -1,8 +1,6 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors Z80'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
diff --git a/Ghidra/Processors/Z80/certification.manifest b/Ghidra/Processors/Z80/certification.manifest
index 2291218919..a44e6e5377 100644
--- a/Ghidra/Processors/Z80/certification.manifest
+++ b/Ghidra/Processors/Z80/certification.manifest
@@ -1,9 +1,6 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
-data/build.xml||GHIDRA||||END|
data/languages/z180.pspec||GHIDRA||||END|
data/languages/z180.slaspec||GHIDRA||reviewed||END|
data/languages/z182.pspec||GHIDRA||||END|
diff --git a/Ghidra/Processors/x86/build.gradle b/Ghidra/Processors/x86/build.gradle
index bc4351f67e..756d4b965f 100644
--- a/Ghidra/Processors/x86/build.gradle
+++ b/Ghidra/Processors/x86/build.gradle
@@ -1,10 +1,11 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+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/processorProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Processors x86'
-/*********************************************************************************
- * Imports
- *********************************************************************************/
-apply from: "$rootProject.projectDir/gradleScripts/processorUtils.gradle"
dependencies {
compile project(':Base')
diff --git a/Ghidra/Processors/x86/certification.manifest b/Ghidra/Processors/x86/certification.manifest
index f3ab3a4e45..b499e4cc9a 100644
--- a/Ghidra/Processors/x86/certification.manifest
+++ b/Ghidra/Processors/x86/certification.manifest
@@ -1,6 +1,4 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
data/languages/adx.sinc||GHIDRA||||END|
diff --git a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle b/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle
index dd124fd9c8..a8657a9b5a 100644
--- a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle
+++ b/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle
@@ -181,7 +181,7 @@ task indexHelp(type: JavaExec) {
}
group "private"
- description "indexes the helps files for this module. [gradleScripts/buildHelp.gradle]"
+ description "indexes the helps files for this module. [gradle/helpProject.gradle]"
}
// task for building Ghidra help files - depends on the output from the help indexer
@@ -209,7 +209,7 @@ task buildHelp(type: JavaExec, dependsOn: indexHelp) {
}
args "${helpRootDir.absolutePath}" // tell the help builder what help dir to process
}
- description " Builds the help for this module. [gradleScripts/buildHelp.gradle]\n"
+ description " Builds the help for this module. [gradle/helpProject.gradle]\n"
}
// include the help into the module's jar
diff --git a/Ghidra/RuntimeScripts/build.gradle b/Ghidra/RuntimeScripts/build.gradle
index bf22bbaf9d..012bb04f61 100644
--- a/Ghidra/RuntimeScripts/build.gradle
+++ b/Ghidra/RuntimeScripts/build.gradle
@@ -1,4 +1,41 @@
apply plugin: 'eclipse'
+
eclipse.project.name = '_Runtime Scripts'
-ext.isPureEclipseProject = true
+rootProject.assembleDistribution {
+
+ from (this.project.file("Common/support")) {
+ into "support"
+ }
+
+ from (this.project.file("Common/server")) {
+ into "server"
+ }
+}
+
+rootProject.OS_NAMES.each { platform ->
+ rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
+ def p = this.project
+
+ if (isLinux(platform) || isMac(platform)) {
+ t.from ("${p.projectDir}/Linux/support") {
+ into "support"
+ }
+ t.from ("${p.projectDir}/Linux/server") {
+ into "server"
+ }
+ t.from (p.file("Linux/ghidraRun"))
+ }
+
+ if (isWindows(platform)) {
+ t.from ("${p.projectDir}/Windows/support") {
+ into "support"
+ }
+ t.from ("${p.projectDir}/Windows/server") {
+ into "server"
+ }
+ t.from (p.file("Windows/ghidraRun.bat"))
+ }
+ }
+}
+
diff --git a/Ghidra/RuntimeScripts/certification.manifest b/Ghidra/RuntimeScripts/certification.manifest
index 615c243192..f9c5779579 100644
--- a/Ghidra/RuntimeScripts/certification.manifest
+++ b/Ghidra/RuntimeScripts/certification.manifest
@@ -1,7 +1,5 @@
##VERSION: 2.0
##MODULE IP: Copyright Distribution Permitted
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
Common/server/server.conf||GHIDRA||||END|
Common/server/svrREADME.html||GHIDRA||||END|
Common/support/analyzeHeadlessREADME.html||GHIDRA||||END|
diff --git a/Ghidra/Test/IntegrationTest/build.gradle b/Ghidra/Test/IntegrationTest/build.gradle
index a69d7a6411..a207fca51f 100644
--- a/Ghidra/Test/IntegrationTest/build.gradle
+++ b/Ghidra/Test/IntegrationTest/build.gradle
@@ -1,29 +1,32 @@
+apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply plugin: 'eclipse'
eclipse.project.name = '_Integration Test'
-ext.excludeFromBuild = true
/*********************************************************************************
* Build dependencies
*********************************************************************************/
dependencies {
-
// integration test module may depends on all other projects within this repo
def ghidraPath = projectDir.getParentFile().getParentFile().path.replace(File.separator, "/") + "/";
- rootProject.subprojects.each { p ->
-
- def projectPath = p.projectDir.path.replace(File.separator, "/")
-
- if (projectPath.startsWith(ghidraPath) && (
- projectPath.contains("/Framework/") ||
- projectPath.contains("/Features/") ||
- projectPath.contains("/Processors/"))) {
- compile p
- }
+ rootProject.subprojects { p ->
+ p.plugins.withType(JavaPlugin) {
+ def projectPath = p.projectDir.path.replace(File.separator, "/")
+ if (projectPath.contains("ghidra/Ghidra")) {
+ if (projectPath.contains("/Framework/") ||
+ projectPath.contains("/Features/") ||
+ projectPath.contains("/Processors/")) {
+
+ compile p
+ }
+ }
+ }
}
+
// some tests use classes in Base/src/test and test.slow
testCompile project(':Base').sourceSets.test.output
}
diff --git a/Ghidra/Test/IntegrationTest/certification.manifest b/Ghidra/Test/IntegrationTest/certification.manifest
index 274dfb4c1f..50bf3491fd 100644
--- a/Ghidra/Test/IntegrationTest/certification.manifest
+++ b/Ghidra/Test/IntegrationTest/certification.manifest
@@ -1,4 +1,2 @@
##VERSION: 2.0
-.classpath||NONE||||END|
-.project||NONE||||END|
build.gradle||GHIDRA||||END|
diff --git a/GhidraBuild/BuildFiles/JsonDoclet/build.gradle b/GhidraBuild/BuildFiles/JsonDoclet/build.gradle
index db5fa4daf4..c079660a1e 100644
--- a/GhidraBuild/BuildFiles/JsonDoclet/build.gradle
+++ b/GhidraBuild/BuildFiles/JsonDoclet/build.gradle
@@ -8,3 +8,6 @@ dependencies {
exclude group: 'junit', module: 'junit'
}
}
+
+rootProject.createJsondocs.dependsOn jar
+
diff --git a/GhidraBuild/BuildFiles/build.gradle b/GhidraBuild/BuildFiles/build.gradle
index 920dd67199..4b835705fe 100644
--- a/GhidraBuild/BuildFiles/build.gradle
+++ b/GhidraBuild/BuildFiles/build.gradle
@@ -1,5 +1,4 @@
apply plugin: 'eclipse'
+apply plugin: 'java'
eclipse.project.name = '_BuildFiles'
-ext.isPureEclipseProject = true
-ext.excludeFromBuild = true
diff --git a/GhidraBuild/BuildFiles/certification.manifest b/GhidraBuild/BuildFiles/certification.manifest
index 95930675a6..06abe1b568 100644
--- a/GhidraBuild/BuildFiles/certification.manifest
+++ b/GhidraBuild/BuildFiles/certification.manifest
@@ -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|
diff --git a/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle b/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle
index 6019e75f7e..5809af3361 100644
--- a/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle
+++ b/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/build.gradle
@@ -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
diff --git a/GhidraBuild/IDAPro/build.gradle b/GhidraBuild/IDAPro/build.gradle
new file mode 100644
index 0000000000..f34e4480bd
--- /dev/null
+++ b/GhidraBuild/IDAPro/build.gradle
@@ -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"
+ }
+}
\ No newline at end of file
diff --git a/GhidraBuild/IDAPro/certification.manifest b/GhidraBuild/IDAPro/certification.manifest
index 1bcafeb463..875b575e1f 100644
--- a/GhidraBuild/IDAPro/certification.manifest
+++ b/GhidraBuild/IDAPro/certification.manifest
@@ -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|
diff --git a/GhidraBuild/LaunchSupport/build.gradle b/GhidraBuild/LaunchSupport/build.gradle
index 89fc2bafc2..2c2db6bd07 100644
--- a/GhidraBuild/LaunchSupport/build.gradle
+++ b/GhidraBuild/LaunchSupport/build.gradle
@@ -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
\ No newline at end of file
+targetCompatibility = 1.7
+
+rootProject.assembleDistribution {
+ from (jar) {
+ into "support"
+ }
+}
\ No newline at end of file
diff --git a/GhidraBuild/LaunchSupport/certification.manifest b/GhidraBuild/LaunchSupport/certification.manifest
index 5c8703a87b..50bf3491fd 100644
--- a/GhidraBuild/LaunchSupport/certification.manifest
+++ b/GhidraBuild/LaunchSupport/certification.manifest
@@ -1,4 +1,2 @@
##VERSION: 2.0
-.classpath||GHIDRA||||END|
-.project||GHIDRA||||END|
build.gradle||GHIDRA||||END|
diff --git a/GhidraBuild/Skeleton/build.gradle b/GhidraBuild/Skeleton/build.gradle
index 45c7cde2a3..0843e819fd 100644
--- a/GhidraBuild/Skeleton/build.gradle
+++ b/GhidraBuild/Skeleton/build.gradle
@@ -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.
\ No newline at end of file
+// 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"
+ }
+}
\ No newline at end of file
diff --git a/GhidraBuild/Skeleton/certification.manifest b/GhidraBuild/Skeleton/certification.manifest
index 89c984df68..e0904abf9f 100644
--- a/GhidraBuild/Skeleton/certification.manifest
+++ b/GhidraBuild/Skeleton/certification.manifest
@@ -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|
diff --git a/GhidraBuild/Skeleton/data/README.txt b/GhidraBuild/Skeleton/data/README.txt
index b36dddf754..03a9535c71 100644
--- a/GhidraBuild/Skeleton/data/README.txt
+++ b/GhidraBuild/Skeleton/data/README.txt
@@ -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.
diff --git a/GhidraBuild/Skeleton/data/build.xml b/GhidraBuild/Skeleton/data/buildLanguage.xml
similarity index 100%
rename from GhidraBuild/Skeleton/data/build.xml
rename to GhidraBuild/Skeleton/data/buildLanguage.xml
diff --git a/GhidraBuild/build.gradle b/GhidraBuild/build.gradle
deleted file mode 100644
index 2a1db57909..0000000000
--- a/GhidraBuild/build.gradle
+++ /dev/null
@@ -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'
- }
- }
- }
-}
\ No newline at end of file
diff --git a/GhidraDocs/build.gradle b/GhidraDocs/build.gradle
index d554bb03f3..c51db03b63 100644
--- a/GhidraDocs/build.gradle
+++ b/GhidraDocs/build.gradle
@@ -1,2 +1,13 @@
apply plugin: 'eclipse'
eclipse.project.name = '_GhidraDocs'
+
+
+rootProject.assembleDistribution {
+ from (this.project.projectDir) {
+ exclude "**/build.gradle"
+ exclude "**/build/**"
+ exclude "**/bin/**"
+ into "docs"
+
+ }
+}
\ No newline at end of file
diff --git a/GhidraDocs/certification.manifest b/GhidraDocs/certification.manifest
index 5520cbf186..ba32ce1d2e 100644
--- a/GhidraDocs/certification.manifest
+++ b/GhidraDocs/certification.manifest
@@ -6,7 +6,6 @@
##MODULE IP: Nuvola Icons - LGPL 2.1
##MODULE IP: Public Domain
##MODULE IP: Tango Icons - Public Domain
-.classpath||GHIDRA||||END|
.project||GHIDRA||||END|
CheatSheet.html||GHIDRA||||END|
GhidraClass/Advanced/Examples/Makefile||GHIDRA||||END|
@@ -105,3 +104,23 @@ images/table_go.png||FAMFAMFAM Icons - CC 2.5||||END|
images/undo.png||GHIDRA||||END|
images/up.png||GHIDRA||||END|
images/viewmagfit.png||Nuvola Icons - LGPL 2.1||||END|
+languages/html/Diagram1.png||GHIDRA||||END|
+languages/html/Diagram2.png||GHIDRA||||END|
+languages/html/Diagram3.png||GHIDRA||||END|
+languages/html/additionalpcode.html||GHIDRA||||END|
+languages/html/pcodedescription.html||GHIDRA||||END|
+languages/html/pcoderef.html||GHIDRA||||END|
+languages/html/pseudo-ops.html||GHIDRA||||END|
+languages/html/reference.html||GHIDRA||||END|
+languages/html/sleigh.html||GHIDRA||||END|
+languages/html/sleigh_constructors.html||GHIDRA||||END|
+languages/html/sleigh_context.html||GHIDRA||||END|
+languages/html/sleigh_definitions.html||GHIDRA||||END|
+languages/html/sleigh_layout.html||GHIDRA||||END|
+languages/html/sleigh_preprocessing.html||GHIDRA||||END|
+languages/html/sleigh_ref.html||GHIDRA||||END|
+languages/html/sleigh_symbols.html||GHIDRA||||END|
+languages/html/sleigh_tokens.html||GHIDRA||||END|
+languages/index.html||GHIDRA||||END|
+languages/manual_index.txt||GHIDRA||||END|
+languages/versioning.html||GHIDRA||||END|
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram1.png b/GhidraDocs/languages/html/Diagram1.png
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram1.png
rename to GhidraDocs/languages/html/Diagram1.png
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram2.png b/GhidraDocs/languages/html/Diagram2.png
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram2.png
rename to GhidraDocs/languages/html/Diagram2.png
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram3.png b/GhidraDocs/languages/html/Diagram3.png
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Diagram3.png
rename to GhidraDocs/languages/html/Diagram3.png
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Frontpage.css b/GhidraDocs/languages/html/Frontpage.css
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/Frontpage.css
rename to GhidraDocs/languages/html/Frontpage.css
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/additionalpcode.html b/GhidraDocs/languages/html/additionalpcode.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/additionalpcode.html
rename to GhidraDocs/languages/html/additionalpcode.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/languages.css b/GhidraDocs/languages/html/languages.css
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/languages.css
rename to GhidraDocs/languages/html/languages.css
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pcodedescription.html b/GhidraDocs/languages/html/pcodedescription.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pcodedescription.html
rename to GhidraDocs/languages/html/pcodedescription.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pcoderef.html b/GhidraDocs/languages/html/pcoderef.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pcoderef.html
rename to GhidraDocs/languages/html/pcoderef.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pseudo-ops.html b/GhidraDocs/languages/html/pseudo-ops.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/pseudo-ops.html
rename to GhidraDocs/languages/html/pseudo-ops.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/reference.html b/GhidraDocs/languages/html/reference.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/reference.html
rename to GhidraDocs/languages/html/reference.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh.html b/GhidraDocs/languages/html/sleigh.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh.html
rename to GhidraDocs/languages/html/sleigh.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_constructors.html b/GhidraDocs/languages/html/sleigh_constructors.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_constructors.html
rename to GhidraDocs/languages/html/sleigh_constructors.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_context.html b/GhidraDocs/languages/html/sleigh_context.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_context.html
rename to GhidraDocs/languages/html/sleigh_context.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_definitions.html b/GhidraDocs/languages/html/sleigh_definitions.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_definitions.html
rename to GhidraDocs/languages/html/sleigh_definitions.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_layout.html b/GhidraDocs/languages/html/sleigh_layout.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_layout.html
rename to GhidraDocs/languages/html/sleigh_layout.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_preprocessing.html b/GhidraDocs/languages/html/sleigh_preprocessing.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_preprocessing.html
rename to GhidraDocs/languages/html/sleigh_preprocessing.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_ref.html b/GhidraDocs/languages/html/sleigh_ref.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_ref.html
rename to GhidraDocs/languages/html/sleigh_ref.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_symbols.html b/GhidraDocs/languages/html/sleigh_symbols.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_symbols.html
rename to GhidraDocs/languages/html/sleigh_symbols.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_tokens.html b/GhidraDocs/languages/html/sleigh_tokens.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/html/sleigh_tokens.html
rename to GhidraDocs/languages/html/sleigh_tokens.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/index.html b/GhidraDocs/languages/index.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/index.html
rename to GhidraDocs/languages/index.html
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/manual_index.txt b/GhidraDocs/languages/manual_index.txt
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/manual_index.txt
rename to GhidraDocs/languages/manual_index.txt
diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/languages/versioning.html b/GhidraDocs/languages/versioning.html
similarity index 100%
rename from Ghidra/Configurations/Public_Release/src/global/docs/languages/versioning.html
rename to GhidraDocs/languages/versioning.html
diff --git a/build.gradle b/build.gradle
index c3eb0efac8..a007161b2e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,8 @@
apply plugin: 'eclipse'
-apply from: 'gradleScripts/eclipseFilters.gradle'
-apply from: "gradleScripts/eclipseLauncher.gradle"
+
+apply from: 'gradle/root/eclipse.gradle'
+apply from: "gradle/support/eclipseLauncher.gradle"
+
/***************************************************************************************
@@ -41,14 +43,7 @@ allprojects {
* load properties from Ghidra/application.properties file
*********************************************************************************/
-apply from: "gradleScripts/loadApplicationProperties.gradle"
-
-/*********************************************************************************
- * Set up the configurations and source sets for java projects
- *********************************************************************************/
-
-apply from: "gradleScripts/setupJava.gradle"
-apply from: "gradleScripts/setupJacoco.gradle" // Has a dependecy on ext vars in setupJava.gradle
+apply from: "gradle/support/loadApplicationProperties.gradle"
/****************************************************************************
* Create a set containing all the platforms we need when building native
@@ -71,15 +66,12 @@ project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64"])
* Eventually distribution.gradle will be removed entirely, but it is included
* here for the time being for those who need it.
*********************************************************************************/
-
-apply from: "gradleScripts/ip.gradle" // adds tasks for building ip notices
-apply from: 'gradleScripts/distribution.gradle' // adds zip tasks
-//apply from: 'gradleScripts/diagnostics/findbugs.gradle' // adds findbugs tasks
-apply from: 'gradleScripts/usage.gradle' // adds task documentation
-apply from: "gradleScripts/prepDev.gradle" // adds prepDev task for each subproject
-apply from: "gradleScripts/svg.gradle" // adds task to process svg files
-apply from: "gradleScripts/test.gradle" // adds tasks for running tests
-apply from: "gradleScripts/jacoco.gradle" // adds tasks for java code coverage
+apply from: "gradle/root/test.gradle" // adds tasks for running tests
+apply from: "gradle/root/prepDev.gradle" // adds prepDev task for each subproject
+apply from: 'gradle/root/distribution.gradle' // adds zip tasks
+apply from: 'gradle/root/usage.gradle' // adds task documentation
+apply from: "gradle/root/svg.gradle" // adds task to process svg files
+apply from: "gradle/root/jacoco.gradle" // adds tasks for java code coverage
apply plugin: 'base'
@@ -97,13 +89,7 @@ clean {
* Returns true if the platform is a linux machine.
*********************************************************************************/
def isLinux(String platformName) {
-
- if (platformName.startsWith("linux")) {
- return true
- }
- else {
- return false
- }
+ return platformName.startsWith("linux")
}
@@ -111,13 +97,7 @@ def isLinux(String platformName) {
* Returns true if the platform is a mac
*********************************************************************************/
def isMac(String platformName) {
-
- if (platformName.startsWith("osx")) {
- return true
- }
- else {
- return false
- }
+ return platformName.startsWith("osx")
}
@@ -125,13 +105,7 @@ def isMac(String platformName) {
* Returns true if the platform is a Windows machine.
*********************************************************************************/
def isWindows(String platformName) {
-
- if (platformName.startsWith("win")) {
- return true
- }
- else {
- return false
- }
+ return platformName.startsWith("win")
}
/******************************************************************************************
@@ -289,7 +263,6 @@ String getCurrentPlatformName() {
*
*********************************************************************************/
List<String> getExternalDependencies(Project project) {
-
List<String> list = new ArrayList<String>()
// for each dependency in the compile configuration
@@ -330,11 +303,13 @@ String generateLibraryDependencyMapping() {
libsFile.withWriter { out ->
subprojects { p ->
- List<String> libs = getExternalDependencies(p);
- if (libs != null) {
- out.println "Module: $p.name"
- libs.each { path ->
- out.println "\t$path"
+ p.plugins.withType(JavaPlugin) {
+ List<String> libs = getExternalDependencies(p);
+ if (libs != null) {
+ out.println "Module: $p.name"
+ libs.each { path ->
+ out.println "\t$path"
+ }
}
}
}
@@ -342,12 +317,5 @@ String generateLibraryDependencyMapping() {
return libsFile.absolutePath
}
-task allEclipse {
- dependsOn ':eclipse'
-}
-
-allprojects { proj ->
- if (proj != rootProject) {
- allEclipse.dependsOn ":$proj.name:eclipse"
- }
+task allSleighCompile {
}
diff --git a/gradle/README.txt b/gradle/README.txt
new file mode 100644
index 0000000000..e3ef7a082c
--- /dev/null
+++ b/gradle/README.txt
@@ -0,0 +1,22 @@
+This folder contains the gradle scripts for the build system. The gradle files at this level are
+intended to be included by individual gradle project's build.gradle files. They add support for
+specific capabilities and are described below. There are also two sub-folders. The sub-folder
+"root" contains gradle scripts that are applied only to the root project's build.gradle file and
+are just a way to organize and break up the root project's build code. The other sub-folder "support"
+contains gradle scripts applied from other gradle scripts, mainly to avoid duplication of code.
+
+The following gradle scripts can be applied to a project's build.gradle file to add support for various capabilities.
+
+javaProject.gradle - apply if the project contains java code.
+nativeProject.gradle - apply if the project contains native code.
+processorProject.gradle - apply if the project contains processor language specification.
+helpProject.gradle - apply if the project contains files for the Ghidra help system.
+javaTestProject.gradle - apply if the project contains unit tests.
+jacocoProject.gradle - apply to the project to include it in when running the Jacoco task.
+
+The following scripts can be included if the project is to be included in the build process. Only
+one of these scripts should be applied to a project.
+
+distributableGhidraModule.gradle - apply if the Ghidra module should be included in the distribution build.
+distributableGhidraExtension.gradle - apply if the Ghidra extension should be included in the distribution build.
+externalGhidraExtension.gradle - apply if the Ghidra extension should be built external to the distribution build.
diff --git a/gradle/certification.manifest b/gradle/certification.manifest
new file mode 100644
index 0000000000..b7a86e2f74
--- /dev/null
+++ b/gradle/certification.manifest
@@ -0,0 +1,26 @@
+##VERSION: 2.0
+README.txt||GHIDRA||||END|
+distributableGhidraExtension.gradle||GHIDRA||||END|
+distributableGhidraModule.gradle||GHIDRA||||END|
+externalGhidraExtension.gradle||GHIDRA||||END|
+helpProject.gradle||GHIDRA||||END|
+jacocoProject.gradle||GHIDRA||||END|
+javaProject.gradle||GHIDRA||||END|
+javaTestProject.gradle||GHIDRA||||END|
+nativeProject.gradle||GHIDRA||||END|
+processorProject.gradle||GHIDRA||||END|
+root/distribution.gradle||GHIDRA||||END|
+root/eclipse.gradle||GHIDRA||||END|
+root/jacoco.gradle||GHIDRA||||END|
+root/prepDev.gradle||GHIDRA||||END|
+root/svg.gradle||GHIDRA||||END|
+root/test.gradle||GHIDRA||||END|
+root/usage.gradle||GHIDRA||||END|
+support/distributionCommon.gradle||GHIDRA||||END|
+support/eclipseLauncher.gradle||GHIDRA||||END|
+support/extensionCommon.gradle||GHIDRA||||END|
+support/ip.gradle||GHIDRA||||END|
+support/jacoco.excludes.src.txt||GHIDRA||||END|
+support/loadApplicationProperties.gradle||GHIDRA||||END|
+support/settingsUtil.gradle||GHIDRA||||END|
+support/testUtils.gradle||GHIDRA||||END|
diff --git a/gradle/distributableGhidraExtension.gradle b/gradle/distributableGhidraExtension.gradle
new file mode 100644
index 0000000000..d124e67444
--- /dev/null
+++ b/gradle/distributableGhidraExtension.gradle
@@ -0,0 +1,26 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if it
+ has content that should be included in a distribution as an extension. Including this
+ will cause all the standard module files to be included in the build as a sub-zipped extension.
+
+ A gradle project can add itself as an extension to the build distribution by adding the
+ following to its build.gradle file:
+
+ apply from: "$rootProject.projectDir/gradle/support/distributableGhidraModule.gradle"
+*****************************************************************************************/
+
+apply from: "$rootProject.projectDir/gradle/support/distributionCommon.gradle"
+apply from: "$rootProject.projectDir/gradle/support/extensionCommon.gradle"
+
+rootProject.createInstallationZip {
+ from (this.project.zipExtensions) {
+ into {
+ ZIP_DIR_PREFIX + "/Extensions/Ghidra"
+ }
+ }
+ doLast {
+ this.project.zipExtensions.outputs.each {
+ delete it
+ }
+ }
+}
diff --git a/gradle/distributableGhidraModule.gradle b/gradle/distributableGhidraModule.gradle
new file mode 100644
index 0000000000..ac6982ed2b
--- /dev/null
+++ b/gradle/distributableGhidraModule.gradle
@@ -0,0 +1,174 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if it
+ has content that should be included in a distribution. (Unless the content should be included
+ as an "extension", in which case it should include "extensionModule" instead)
+
+ A gradle project can add itself to the distribution build by adding the following to its
+ build.gradle file:
+
+ apply from: "$rootProject.projectDir/gradle/support/distributableGhidraModule.gradle"
+ *****************************************************************************************/
+
+apply from: "$rootProject.projectDir/gradle/support/distributionCommon.gradle"
+
+rootProject.assembleDistribution {
+ def p = this.project
+
+ def zipPath = getZipPath(p)
+
+ from (p.projectDir.toString() + "/Module.manifest") {
+ into { zipPath }
+ }
+
+ from (p.projectDir.toString() + "/data") {
+ into { zipPath + "/data" }
+ exclude 'build.xml' // associated with language modules (dev use only)
+ }
+
+ from (BIN_REPO + '/' + getGhidraRelativePath(p) + "/data") {
+ into { zipPath + "/data" }
+ }
+
+ from (p.projectDir.toString() + "/build/LICENSE.txt") {
+ into { zipPath }
+ }
+
+ // handle special case where modules build data artifacts into the build dir
+ from (p.projectDir.toString() + "/build/data") {
+ into {zipPath + "/data" }
+ }
+
+ /////////////////
+ // SOURCE FOR BUILD
+ //
+ // Some projects require that we provide source that can be built (makefiles,
+ // gradle build files, c-code, etc...). If a project has a task for that
+ // purpose, execute it here.
+ //
+ // Note the 'afterEvaluate' call - this must be done so the zip task in the
+ // subproject is added to the task graph before the 'dependsOn' clause is
+ // executed. If we don't do this, that dependsOn relationship won't be respected
+ // and the subproject zip task won't be executed.
+ /////////////////
+ p.tasks.each { t ->
+ if (t.name == "zipBuildableSource") {
+ assembleDistribution.dependsOn {t}
+ from (t) {
+ into zipPath
+ }
+ }
+ }
+
+ ///////////////////////
+ // copy Global files - files in a module under 'src/global' are copied to the project root
+ // relative to its location under 'src/global'
+ ///////////////////////
+
+ // First get a list of all files that are under 'src/global'.
+ FileTree fileTree = p.fileTree('src/global') {
+ include '**/*'
+ }
+ // Now loop over each one, copying it into the zip we're creating. Each will be placed
+ // at the root level, starting with the first folder AFTER 'src/global/'.
+ //
+ // eg: If the file is '/Ghidra/Configurations/Common/src/global/docs/hello.html', then
+ // the file in the zip will be at /docs/hello.html
+ //
+ fileTree.each { File file ->
+ String filePath = getGlobalFilePathSubDirName(file)
+ from (file) {
+ into filePath
+ }
+ }
+}
+
+
+/*********************************************************************************
+ * Takes the given file and returns a string representing the file path with everything
+ * up-to and including 'src/global' removed, as well as the filename.
+ *
+ * eg: If the file path is '/Ghidra/Configurations/Common/src/global/docs/hello.html',
+ * the returned string will be at /docs
+ *
+ * Note: We have to use 'File.separator' instead of a slash ('/') because of how
+ * windows/unix handle slashes ('/' vs. '\'). We only need to do this in cases where we're
+ * using java string manipulation libraries (eg String.replace); Gradle already
+ * understands how to use the proper slash.
+*********************************************************************************/
+String getGlobalFilePathSubDirName(File file) {
+
+ // First strip off everything before 'src/global/ in the file path.
+ def slashIndex = file.path.indexOf('src' + File.separator + 'global')
+ String filePath = file.path.substring(slashIndex);
+
+ // Now remove 'src/global/' from the string.
+ filePath = filePath.replace('src' + File.separator + 'global' + File.separator, "");
+
+ // Now we need to strip off the filename itself, which we do by finding the last
+ // instance of a slash ('/') in the string.
+ //
+ // Note that it's possible there is no slash (all we have is a filename), meaning
+ // this file will be placed at the root level.
+ //
+ slashIndex = filePath.lastIndexOf(File.separator)
+ if (slashIndex != -1) {
+ filePath = filePath.substring(0, slashIndex+1) // +1 for the slash
+ }
+ else {
+ filePath = ""
+ }
+
+ return filePath
+}
+
+
+
+plugins.withType(JavaPlugin) {
+ // build up a java classpath for javadocs
+ rootProject.ghidraPath.from(sourceSets.main.compileClasspath)
+
+ rootProject.assembleSource {
+ from (this.project.zipSourceSubproject) {
+ into rootProject.ext.ZIP_DIR_PREFIX + "/" + getZipPath(this.project) + "/lib"
+ }
+ }
+
+ rootProject.assembleDistribution {
+ dependsOn assemble
+ def p = this.project
+ def zipPath = getZipPath(p)
+
+ from (p.jar) {
+ // use closures for getting zip path to delay evaluation. See note at top of file.
+ into { zipPath + "/lib" }
+ }
+ from (p.projectDir.toString() + "/ghidra_scripts") {
+ exclude 'bin/'
+ into { zipPath + "/ghidra_scripts" }
+ }
+
+ // External Libraries
+ gradle.taskGraph.whenReady { taskGraph ->
+ List<String> externalPaths = getExternalDependencies(p)
+ externalPaths.each { path ->
+ from (path) {
+ into {zipPath + "/lib" }
+ }
+ }
+ }
+
+
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Native
+/////////////////////////////////////////////////////////////////////////////
+plugins.withType(CPlugin) {
+ rootProject.OS_NAMES.each { platform ->
+ rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
+ t.dependsOn this.assemble
+ // t.dependsOn this.project.name+":buildNatives_$platform"
+ }
+ }
+}
diff --git a/gradle/externalGhidraExtension.gradle b/gradle/externalGhidraExtension.gradle
new file mode 100644
index 0000000000..61366d55ae
--- /dev/null
+++ b/gradle/externalGhidraExtension.gradle
@@ -0,0 +1,12 @@
+apply from: "$rootProject.projectDir/gradle/support/distributionCommon.gradle"
+apply from: "$rootProject.projectDir/gradle/support/extensionCommon.gradle"
+
+rootProject.createExternalExtensions {
+ from (this.project.zipExtensions)
+ doLast {
+ this.project.zipExtensions.outputs.each {
+ delete it
+ }
+ }
+}
+
diff --git a/gradleScripts/buildHelp.gradle b/gradle/helpProject.gradle
similarity index 73%
rename from gradleScripts/buildHelp.gradle
rename to gradle/helpProject.gradle
index 93f0b6c0da..f77f7e7391 100644
--- a/gradleScripts/buildHelp.gradle
+++ b/gradle/helpProject.gradle
@@ -1,11 +1,12 @@
-/*
- This gradle file is a 'script plugin'. That is, a script that provides features
- meant to be used by other build files via an 'apply' call like so:
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if they
+ have content for the Ghidra help system. A gradle project can include help support by adding
+ the following to its build.gradle file.
- apply from: "$rootProject.projectDir/gradleScripts/buildHelp.gradle"
+ apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
- This call will pull in the tasks in this file. Clients can register dependencies
- on other help modules by using the 'helpPath' configuration, like so:
+ Clients can register dependencies on other help modules by using the
+ 'helpPath' configuration, like so:
helpPath project(path: ":Base", configuration: 'helpPath')
@@ -15,7 +16,9 @@
the generated jar file. This allows future clients of a given help module to get
the jar file path of that help module's output.
-*/
+ *****************************************************************************************/
+// The help modules must be configured first so that we can reference its runtime classpath
+
configurations {
// The Help Build System takes optional paths to resolve dependencies. Build files
// that use this 'script plugin' may put project paths into this variable.
@@ -42,6 +45,7 @@ sourceSets {
dependencies {
helpIndexCompile "javax.help:javahelp:2.0.05"
+ helpIndexCompile project(path: ':Help', configuration: 'archives')
}
// Task for calling the java help indexer, which creates a searchable index of the
@@ -49,7 +53,7 @@ dependencies {
task indexHelp(type: JavaExec) {
group "private"
- description "indexes the helps files for this module. [gradleScripts/buildHelp.gradle]"
+ description "indexes the helps files for this module. [gradle/helpProject.gradle]"
File helpRootDir = file('src/main/help/help')
@@ -103,10 +107,8 @@ task indexHelp(type: JavaExec) {
// Task for building Ghidra help files
// - depends on the output from the help indexer
task buildHelp(type: JavaExec, dependsOn: indexHelp) {
-
group rootProject.GHIDRA_GROUP
- description " Builds the help for this module. [gradleScripts/buildHelp.gradle]\n"
-
+ description " Builds the help for this module. [gradle/helpProject.gradle]\n"
File helpRootDir = file('src/main/help/help')
File outputDir = file('build/help/main/help')
@@ -114,9 +116,6 @@ task buildHelp(type: JavaExec, dependsOn: indexHelp) {
inputs.dir helpRootDir
outputs.dir outputDir
- // this modules runtime classpath (contains jhall.jar)
- classpath = project(':Help').sourceSets.main.runtimeClasspath
-
main = 'help.GHelpBuilder'
args '-n', "${project.name}" // use the module's name for the help file name
@@ -127,6 +126,8 @@ task buildHelp(type: JavaExec, dependsOn: indexHelp) {
// args '-debug' // print debug info
doFirst {
+ // this modules runtime classpath (contains jhall.jar)
+ classpath project(':Help').sourceSets.main.runtimeClasspath
configurations.helpPath.each {
args "-hp"
@@ -147,5 +148,9 @@ jar {
}
// build the help whenever this module's jar file is built
-jar.dependsOn 'buildHelp'
+jar.dependsOn buildHelp
+
+// make sure generated help directories exist during prepdev so that the directories are created and
+// eclipse doesn't complain about missing src directories.
+rootProject.prepDev.dependsOn buildHelp
diff --git a/gradle/jacocoProject.gradle b/gradle/jacocoProject.gradle
new file mode 100644
index 0000000000..7c4f28cad7
--- /dev/null
+++ b/gradle/jacocoProject.gradle
@@ -0,0 +1,33 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects that should be included
+ when running jacoco
+
+ A gradle project can add itself to the jacoco run by adding the following to its build.gradle
+ file:
+
+ apply from: "$rootProject.projectDir/gradle/support/jacocoProject.gradle"
+ *****************************************************************************************/
+
+// Apply jacoco plugin to root and subprojects. This will create coverage files for each java Test task.
+if (rootProject.ext.jacocoEnabled) {
+ apply plugin:'jacoco'
+ dependencies {
+ jacocoAnt 'org.jacoco:org.jacoco.ant:0.8.2'
+ jacocoAgent 'org.jacoco:org.jacoco.agent:0.8.2'
+ }
+}
+
+// Clean any jacoco files that may have been left behind previously.
+clean {
+ doFirst{
+ logger.debug("Deleting subproject jacoco execution data directory: $buildDir/jacoco/")
+ file("$buildDir/jacoco/").deleteDir() // delete jacoco executionData files in individual subprojects
+
+ logger.debug("Deleting root project jacoco execution data directory: $rootProject.buildDir/jacoco/")
+ file("$rootProject.buildDir/jacoco/").deleteDir() // delete jacocoMerge task output
+
+ logger.debug("Deleting jacoco report directory: $rootProject.buildDir/reports/jacoco/")
+ file("$rootProject.buildDir/reports/jacoco/").deleteDir() // delete jacocoReport, jacocoBranchReport output
+ }
+}
+
diff --git a/gradle/javaProject.gradle b/gradle/javaProject.gradle
new file mode 100644
index 0000000000..581ba68b0e
--- /dev/null
+++ b/gradle/javaProject.gradle
@@ -0,0 +1,167 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if they
+ have java code.
+
+ A gradle project can add java support by including the following to its build.gradle file:
+
+ apply from: "$rootProject.projectDir/gradle/support/distributableGhidraModule.gradle"
+ *****************************************************************************************/
+
+import org.gradle.plugins.ide.eclipse.model.Container;
+import org.gradle.plugins.ide.eclipse.model.Library;
+
+
+/*********************************************************************************
+ * Subproject configuration
+ * - all subs will have access to these properties.
+ *********************************************************************************/
+
+apply plugin: 'java'
+
+compileJava {
+ options.compilerArgs << '-Xlint:none'
+ options.compilerArgs << '-XDignore.symbol.file'
+ options.fork = true
+ options.warnings = false
+}
+
+compileTestJava {
+ options.compilerArgs << '-Xlint:none'
+ options.compilerArgs << '-XDignore.symbol.file'
+ options.fork = true
+ options.warnings = false
+}
+
+plugins.withId('java') {
+ sourceCompatibility = "${rootProject.JAVA_COMPILER}"
+ targetCompatibility = "${rootProject.JAVA_COMPILER}"
+}
+
+
+jar {
+ manifest {
+ attributes (
+ "Specification-Title": "${project.name}",
+ "Specification-Version": "${rootProject.RELEASE_VERSION}",
+ "Specification-Vendor": "Ghidra"
+ )
+ }
+}
+
+
+sourceSets {
+ main {
+ java {
+ srcDir 'src/main/java'
+ }
+ resources {
+ srcDir 'src/main/resources'
+ }
+ }
+ test {
+ java {
+ srcDir 'src/test/java'
+ }
+ resources {
+ srcDir 'src/test/resources'
+ }
+ }
+ integrationTest {
+ java {
+ srcDirs = ['src/test.slow/java'] // overwrite srcDir with new path
+ compileClasspath += main.output + test.output
+ runtimeClasspath += main.output + test.output
+ }
+ resources {
+ srcDirs = ['src/test.slow/resources']
+ }
+ }
+ screenShots {
+ java {
+ srcDir 'src/screen/java'
+ compileClasspath += main.output
+ runtimeClasspath += main.output
+ }
+ }
+ cunitTest {
+ java {
+ srcDir 'src/test.processors/java'
+ compileClasspath += main.output
+ runtimeClasspath += main.output
+ }
+ resources {
+ srcDir 'src/test.processors/resources'
+ }
+ }
+ scripts {
+ java {
+ srcDir 'developer_scripts'
+ srcDir 'ghidra_scripts'
+ }
+ }
+}
+
+configurations {
+ integrationTestCompile.extendsFrom testCompile
+ integrationTestRuntime.extendsFrom testRuntime, integrationTestCompile
+ cunitTestCompile.extendsFrom compile
+ testArtifacts.extendsFrom testRuntime
+ integrationTestArtifacts.extendsFrom integrationTestRuntime
+}
+
+task testJar(type: Jar) {
+ classifier "test"
+ from sourceSets.test.output
+}
+
+task integrationTestJar(type: Jar) {
+ classifier "test"
+ from sourceSets.integrationTest.output
+}
+artifacts {
+ testArtifacts testJar
+ integrationTestArtifacts integrationTestJar
+
+}
+
+/*
+ Provide test dependencies here so each build file does not have to.
+*/
+dependencies {
+ integrationTestCompile "org.hamcrest:hamcrest-all:1.3"
+ integrationTestCompile "org.jmockit:jmockit:1.44"
+
+ testCompile "org.hamcrest:hamcrest-all:1.3"
+ testCompile "org.jmockit:jmockit:1.44"
+
+ testCompile "junit:junit:4.12"
+}
+
+// For Java 9, we must explicitly export references to the internal classes we are using.
+// We export them to all "unnamed" modules, which are modules that don't define themselves
+// as a new Java 9 style module. Ghidra is currently using unnamed modules everywhere.
+ext.addExports = { List<String> exports ->
+ tasks.withType(JavaCompile) {
+ exports.each {
+ options.compilerArgs.addAll(['--add-exports', it])
+ }
+ }
+
+ eclipse.classpath.file.whenMerged { classpath ->
+ classpath.entries.each { ent ->
+ if (ent instanceof Container && ent.path.contains('JRE_CONTAINER')) {
+ ent.entryAttributes.put('module', true);
+ ent.entryAttributes.put('add-exports', exports.join(':'));
+ }
+ }
+ }
+}
+
+afterEvaluate {
+ eclipse.classpath.file.whenMerged { classpath ->
+ classpath.entries.removeAll { ent ->
+ ent instanceof Library && !ent.path.endsWith('.jar')
+ }
+ classpath.entries.findAll { entry -> entry.kind == 'lib' }*.exported = true
+ }
+}
diff --git a/gradle/javaTestProject.gradle b/gradle/javaTestProject.gradle
new file mode 100644
index 0000000000..5a972df379
--- /dev/null
+++ b/gradle/javaTestProject.gradle
@@ -0,0 +1,187 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects that should be included
+ if this module has tests that should be included when running all the Ghidra tests.
+
+ A gradle project can add itself to the test run by including the following in its build.gradle
+ file:
+
+ apply from: "$rootProject.projectDir/gradle/support/javaTestProject.gradle"
+ *****************************************************************************************/
+
+configurations {
+ jmockitAgent
+}
+
+dependencies {
+ jmockitAgent('org.jmockit:jmockit:1.44') {
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ }
+}
+
+test { t ->
+
+ forkEvery 1
+ initTestJVM(t, rootProject.ext.testRootDirName)
+
+ // WARNING! WATCH OUT !!
+ // WARNING! Since a single shared JVM instance is used, the first
+ // test and its ApplicationConfiguration will be used to initialize
+ // the class searching environment. This can have a negative impact
+ // on test results due to the inconsistent Application environment
+ // which may exist when all tests are run versus a single test.
+ // Based on this limitation we should only use the Integration base
+ // test classes within integrationTest regions (e.g., test.slow).
+
+ doFirst {
+ startTestTimer(t)
+ }
+ doLast {
+ endTestTimer(t)
+ }
+}
+
+task integrationTest (type: Test) { t ->
+ group "test"
+ dependsOn { project(":FunctionID").unpackFidDatabases }
+ testClassesDirs = files sourceSets.integrationTest.output.classesDirs
+
+ classpath = sourceSets.integrationTest.runtimeClasspath
+
+ // Do not include suite classes; they trigger the tests in the suite to get run twice
+ // (once by normal jUnit and again when the suite runs).
+ excludes = ['**/*Suite*']
+
+ // Enable if you want to force Gradle to launch a new JVM for each test.
+ forkEvery 1
+
+ initTestJVM(t, rootProject.ext.testRootDirName)
+
+ doFirst {
+ startTestTimer(t)
+ }
+ doLast {
+ endTestTimer(t)
+ }
+}
+
+task cunitTest (type: Test) { t ->
+ group "cunit"
+ dependsOn { project(":FunctionID").unpackFidDatabases }
+ testClassesDirs = files sourceSets.cunitTest.output.classesDirs
+ classpath = sourceSets.cunitTest.runtimeClasspath
+
+ // Enable if you want to force Gradle to launch a new JVM for each test.
+ forkEvery 1
+
+ initTestJVM(t, rootProject.ext.cunitTestRootDirName)
+
+ doFirst {
+ startTestTimer(t)
+ }
+ doLast {
+ endTestTimer(t)
+ }
+}
+
+rootProject.unitTestReport {
+ reportOn this.project.test
+}
+rootProject.cunitTestReport {
+ reportOn this.project.cunitTest
+}
+rootProject.combinedTestReport {
+ reportOn this.project.test
+ reportOn this.project.integrationTest
+}
+
+
+
+/*********************************************************************************
+ * Initialize test task
+ *********************************************************************************/
+def initTestJVM(Task task, String rootDirName) {
+
+ def testTempDir = file(rootTestDir).getAbsolutePath()
+ def testReportDir = file(reportDir).getAbsolutePath()
+
+ task.doFirst {
+ println "Test Machine Name: " + machineName
+ println "Root Test Dir: " + rootTestDir
+ println "Test Output Dir: " + testOutputDir
+ println "Test Temp Dir: " + testTempDir
+ println "Test Report Dir: " + testReportDir
+ println "Java Debug Port: " + debugPort
+
+ mkdir testTempDir
+ mkdir testOutputDir
+ }
+ // If false, testing will halt when an error is found.
+ task.ignoreFailures true
+
+ // If false, then tests are re-run every time, even if no code has changed.
+ task.outputs.upToDateWhen {false}
+
+ // Must set this to see System.out print statements.
+ task.testLogging.showStandardStreams = true
+
+ // Min/Max heap size. These are passed in.
+ task.minHeapSize xms
+ task.maxHeapSize xmx
+
+ // for jmockit; needs the javaagent option
+ // -javaagent:/path/to/jmockit.jar
+ task.doFirst {
+ def jmockitPath = configurations.jmockitAgent.singleFile
+
+ task.jvmArgs '-DupgradeProgramErrorMessage=' + upgradeProgramErrorMessage,
+ '-DupgradeTimeErrorMessage=' + upgradeTimeErrorMessage,
+ '-Dlog4j.configuration=' + logPropertiesUrl,
+ '-Dghidra.test.property.batch.mode=true',
+ '-Dghidra.test.property.parallel.mode=' + parallelMode,
+ '-Dghidra.test.property.output.dir=' + testOutputDir,
+ '-Dghidra.test.property.report.dir=' + testReportDir,
+ '-DSystemUtilities.isTesting=true',
+ '-Dmachine.name=' + machineName,
+ '-Djava.io.tmpdir=' + testTempDir,
+ '-Duser.data.dir=' + userHome + '/.ghidra/.ghidra-' + srcTreeName + '-Test',
+ '-Dcpu.core.override=8',
+ '-XX:ParallelGCThreads=8',
+ '-XX:+UseParallelGC',
+ '-Djava.awt.headless=false',
+ // Dont' run this long winded analysis when testing (see DecompilerFunctionAnalyzer)
+ '-DDecompilerFunctionAnalyzer.enabled=false',
+ '-Djava.util.Arrays.useLegacyMergeSort=true',
+ '-Djdk.attach.allowAttachSelf',
+ '-javaagent:' + jmockitPath,
+
+ '-DLock.DEBUG=true',
+ '-Xdebug',
+ '-Xnoagent',
+ '-Djava.compiler=NONE',
+ '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
+ }
+}
+/*********************************************************************************
+ * Record and Print test task start time
+ *********************************************************************************/
+def startTestTimer(Task task) {
+ project.ext.testStartTime = new Date()
+ println ":" + task.project.name + ":" + task.name + " started: " + testStartTime;
+}
+
+/*********************************************************************************
+ * Print test task end time and elapsed time
+ *********************************************************************************/
+def endTestTimer(Task task) {
+ Date endTime = new Date();
+ println ":" + task.project.name + ":" + task.name + " ended: " + endTime;
+
+ long elapsedMS = endTime.getTime() - testStartTime.getTime();
+ long msPerMin = 60 * 1000;
+ long msPerHour = 60 * msPerMin;
+ long hrs = elapsedMS / msPerHour;
+ long mins = (elapsedMS - (hrs * msPerHour)) / msPerMin;
+ long secs = (elapsedMS - (hrs * msPerHour) - (mins * msPerMin)) / 1000;
+ println ":" + task.project.name + ":" + task.name + " elapsed time: " +
+ String.format("%d:%02d:%02d", hrs, mins, secs);
+}
\ No newline at end of file
diff --git a/gradle/nativeProject.gradle b/gradle/nativeProject.gradle
new file mode 100644
index 0000000000..978025b513
--- /dev/null
+++ b/gradle/nativeProject.gradle
@@ -0,0 +1,13 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if they
+ have native code (C or C++).
+
+ A gradle project can add native code support by including the following it its build.gradle file:
+
+ apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+ *****************************************************************************************/
+
+// These same settings are needed in the GPL native, so rather than duplicating this file, we will just call the other file
+
+def projectRootDir = rootProject.projectDir.path
+apply from: "$projectRootDir/GPL/nativeBuildProperties.gradle"
diff --git a/gradleScripts/processorUtils.gradle b/gradle/processorProject.gradle
similarity index 76%
rename from gradleScripts/processorUtils.gradle
rename to gradle/processorProject.gradle
index 7d83c68ccc..85e3f687ed 100644
--- a/gradleScripts/processorUtils.gradle
+++ b/gradle/processorProject.gradle
@@ -1,3 +1,14 @@
+/*****************************************************************************************
+ This file is a "mix-in" gradle script that individual gradle projects should include if they
+ have processor definitions.
+
+ A gradle project can add native code support by including the following it its build.gradle file:
+
+ apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
+ *****************************************************************************************/
+
+
+
/*****************************************************************************************
*
* Create a configuration so the a dependency can be declared on the the software modeling
@@ -35,7 +46,7 @@ task saveSleighArgs {
}
}
-prepDev.dependsOn(saveSleighArgs)
+rootProject.prepDev.dependsOn(saveSleighArgs)
/*****************************************************************************************
*
@@ -44,26 +55,28 @@ prepDev.dependsOn(saveSleighArgs)
*****************************************************************************************/
task writeSleighDevBuild {
def templateFilePath = project(':BuildFiles').projectDir.toString() + "/sleighDevBuild.template"
+
doLast {
// Generate build.xml with injected classpath for running sleigh compiler
+ def sleighDevClasspath = project(':SoftwareModeling').sourceSets.main.runtimeClasspath.collect { it.absolutePath }.join(':')
copy {
into "data"
from (templateFilePath) {
rename { "build.xml" }
- expand ( [ 'gradleSleighDevClasspath': project(':SoftwareModeling').sleighDevClasspath ] )
+ expand ( [ 'gradleSleighDevClasspath': sleighDevClasspath ] )
}
}
}
}
-prepDev.dependsOn(writeSleighDevBuild)
+rootProject.prepDev.dependsOn(writeSleighDevBuild)
/*****************************************************************************************
*
- * Write sleigh build.xml file for each language module into assembleCommon
+ * Write sleigh build.xml file for each language module into assembleDistribution
*
*****************************************************************************************/
-rootProject.assembleCommon {
+rootProject.assembleDistribution {
into (getZipPath(this.project) + "/data") {
from (rootProject.projectDir.toString() + "/GhidraBuild/BuildFiles/sleighDistBuild.template") {
rename { "build.xml" }
@@ -97,26 +110,12 @@ task sleighCompile (type: JavaExec) {
// The task that copies the common files to the distribution folder must depend on
// the sleigh tasks before executing.
-rootProject.assembleCommon.dependsOn(sleighCompile)
-rootProject.assembleCommon.dependsOn(saveSleighArgs)
-
-// For all tasks of type:Test (i.e., integrationTest, cunitTest, etc.), add a task dependency to
-// sleighCompile. The sleighCompile task inputs and outputs are defined such that the *.slaspec
-// files will only be compiled once, in other words, the up-to-date checks work ok in the
-// sleighCompile task. To learn more, visit:
-// https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:up_to_date_checks
-// This task dependency is needed because many tests rely on the language
-// modules as seen in the use of ghidra.test.ToyProgramBuilder.
-// The tasks of type:Test do not know about sleighCompile during their configuration phase, so the
-// dependency must be done in this gradle file.
-rootProject.subprojects.findAll { subproject ->
- boolean isSupporProject = subproject.findProperty("isSupportProject") ?: false;
- if (!isSupporProject) {
- subproject.tasks.withType(Test).all {
- it.dependsOn(sleighCompile)
- }
- }
-}
+rootProject.assembleDistribution.dependsOn sleighCompile
+rootProject.assembleDistribution.dependsOn saveSleighArgs
+
+// Add in this projects sleighCompile to the allSleighCompile task
+rootProject.allSleighCompile.dependsOn sleighCompile
+rootProject.allSleighCompile.dependsOn saveSleighArgs
/*****************************************************************************************
*
@@ -125,7 +124,7 @@ rootProject.subprojects.findAll { subproject ->
*****************************************************************************************/
task cleanSleigh {
group rootProject.GHIDRA_GROUP
- description "Removes all the compile sleigh language files (*.sla). [gradleScripts/processUtils.gradle]\n"
+ description "Removes all the compile sleigh language files (*.sla). [gradle/processProject.gradle]\n"
doLast {
def deleteTree = fileTree(dir: "data/languages", include: "*.sla")
deleteTree.each { File file ->
@@ -151,7 +150,3 @@ sleighCompile.outputs.files (taskOutputs)
// define the sleigh compile inputs to saveSleighArgs to limit task creation to language modules
saveSleighArgs.inputs.files (taskInputs)
-
-def isSupportModule(Project p) {
- return p.findProperty("isSupportProject") ?: false
-}
diff --git a/gradle/root/distribution.gradle b/gradle/root/distribution.gradle
new file mode 100644
index 0000000000..a5de6c45ae
--- /dev/null
+++ b/gradle/root/distribution.gradle
@@ -0,0 +1,444 @@
+import org.apache.tools.ant.filters.*
+
+/*********************************************************************************
+ * distribution.gradle
+ *
+ * This contains gradle tasks for packaging Ghidra artifacts for distribution. To
+ * run a full distribution, execute the buildGhidra task. This will build for the
+ * current platform only. Add -PallPlatforms to build a multiplatform build.
+ *
+ *********************************************************************************/
+
+/********************************************************************************
+ * Local Vars
+ *********************************************************************************/
+def currentPlatform = getCurrentPlatformName()
+def PROJECT_DIR = file (rootProject.projectDir.absolutePath)
+ext.DISTRIBUTION_DIR = file("$buildDir/dist")
+ext.ZIP_NAME_PREFIX = "${rootProject.DISTRO_PREFIX}_${rootProject.RELEASE_NAME}_${rootProject.BUILD_DATE_SHORT}"
+ext.ZIP_DIR_PREFIX = rootProject.DISTRO_PREFIX
+
+
+FileTree javadocFiles = fileTree (rootProject.projectDir.toString()) {
+ include '**/Framework/**/*.java'
+ include '**/Features/Base/src/main/java/**/*.java'
+ exclude '**/Features/Base/src/main/java/ghidra/app/plugin/**/*.java';
+ include '**/Features/Decompiler/src/main/java/ghidra/app/decompiler/**/*.java'
+ include '**/Features/Python/**/*.java'
+ exclude '**/GhidraBuild/**/*.java';
+ exclude '**/src/test/**'
+ exclude '**/src/test.slow/**'
+ exclude '**/pcodeCPort/**' // not intended for general consumption
+}
+ext.ghidraPath = files()
+/*********************************************************************************
+ * JAVADOCS - RAW
+ *
+ * Creates javadocs for all source defined in the above 'javadocFiles' file tree.
+ *
+ * Note: Artifacts are placed in a temporary folder that is deleted upon
+ * completion of the build.
+ *
+ *********************************************************************************/
+task createJavadocs(type: Javadoc, description: 'Generate javadocs for all projects', group: 'Documentation') {
+
+ destinationDir = file(rootProject.projectDir.toString() + "/build/tmp/javadoc")
+
+ failOnError false
+
+ // Here for reference. If we want to turn on javadoc for all source files, uncomment
+ // the following line (and comment out the next one):
+ // source subprojects.collect { it.sourceSets.main.allJava }
+ source javadocFiles
+
+ // Must add classpath for main and test source sets. Javadoc will fail if it cannot
+ // find referenced classes.
+ classpath = rootProject.ext.ghidraPath
+
+ // If we don't exclude module directories, the javascript search feature doesn't work
+ options.addBooleanOption("-no-module-directories", true)
+
+ // Some internal packages are not public and need to be exported.
+ options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
+ "java.desktop/sun.awt=ALL-UNNAMED",
+ "java.base/sun.security.x509=ALL-UNNAMED",
+ "java.base/sun.security.provider=ALL-UNNAMED",
+ "java.base/sun.security.util=ALL-UNNAMED"])
+}
+
+ /*********************************************************************************
+ * JSONDOCS - RAW
+ *
+ * Creates JSON docs for all source defined in the above 'javadocFiles' file tree.
+ * These documents are used by Python to show system documentation (whereas Java will
+ * use Javadoc files).
+ *
+ * Note: Artifacts are placed in a temporary folder that is deleted upon
+ * completion of the build.
+ *
+ *********************************************************************************/
+
+configurations {
+ jsondoc
+}
+
+dependencies {
+ jsondoc project('JsonDoclet')
+}
+
+task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all projects', group: 'Documentation') {
+
+ group 'private'
+
+ String ROOT_PROJECT_DIR = rootProject.projectDir.toString()
+
+ destinationDir = file(ROOT_PROJECT_DIR + "/build/tmp/jsondoc")
+
+ failOnError false
+
+ // Here for reference. If we want to turn on javadoc for all source files, uncomment
+ // the following line (and comment out the next one):
+ // source subprojects.collect { it.sourceSets.main.allJava }
+ source javadocFiles
+
+ // Must add classpath for main and test source sets. Javadoc will fail if it cannot
+ // find referenced classes.
+ classpath = rootProject.ext.ghidraPath
+
+ // Generate at package level because user may try to get help directly on an object they have
+ // rather than its public interface.
+ options.addBooleanOption("package", true)
+
+ // Some internal packages are not public and need to be exported.
+ options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
+ "java.desktop/sun.awt=ALL-UNNAMED",
+ "java.base/sun.security.x509=ALL-UNNAMED",
+ "java.base/sun.security.provider=ALL-UNNAMED",
+ "java.base/sun.security.util=ALL-UNNAMED"])
+
+ options.doclet = "JsonDoclet"
+ doFirst {
+ options.docletpath = new ArrayList(configurations.jsondoc.files)
+ }
+}
+
+/*********************************************************************************
+ * JAVADOCS - ZIP
+ *
+ * Creates a zip file of all javadocs to be put in the release.
+ *
+ * Note: Artifacts are placed in a temporary folder, deleted at build completion
+ *
+ *********************************************************************************/
+task zipJavadocs(type: Zip) {
+ group 'private'
+ archiveName 'GhidraAPI_javadoc.zip'
+ destinationDir file(rootProject.projectDir.toString() + "/build/tmp")
+
+ from createJavadocs {
+ into "api"
+ }
+
+ from createJsondocs {
+ into "api"
+ }
+
+ description "Zips javadocs for Ghidra API. [gradle/root/distribution.gradle]"
+}
+
+/**********************************************************************************************
+ *
+ * Copies platform independant files to the distribution staging area in preparation
+ * for the distribution zip
+ *
+ **********************************************************************************************/
+task assembleDistribution (type: Copy) {
+
+ group 'private'
+ description "Copies core files/folders to the distribution location."
+ destinationDir file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
+
+
+ // Make sure that we don't try to copy the same file with the same path.
+ duplicatesStrategy 'exclude'
+
+ exclude "**/certification.manifest"
+ exclude "**/certification.local.manifest"
+ exclude "**/.project"
+ exclude "**/.classpath"
+ exclude "**/delete.me"
+ exclude "**/.vs/**"
+ exclude "**/*.vcxproj.user"
+ exclude "**/.settings/**"
+
+ /////////////////////////////
+ // COPY all GPL code
+ /////////////////////////////
+ from (ROOT_PROJECT_DIR + "/GPL") {
+ exclude "*/bin"
+ exclude "*/build"
+ into "GPL"
+ }
+
+ //////////////////////////////
+ // LGPL SOURCE INCLUSION
+ //////////////////////////////
+ from ("${rootProject.ext.BIN_REPO}/ExternalLibraries/libsSrc/jcalendar-1.3.3.zip" ) {
+ into "GPL/librarySourceForLGPL"
+ }
+
+ //////////////////////////////
+ // LICENSE SUPPORT
+ //////////////////////////////
+ from ("licenses") {
+ into ("licenses")
+ exclude "**/certification.manifest"
+ }
+
+ from (ROOT_PROJECT_DIR) {
+ include "LICENSE.txt"
+ }
+
+ /////////////////
+ // DB DIR LOCK FILE
+ //
+ // This lock file must be created to prevent users from modifying script files. We
+ // create it here, copy it to the archive, then delete it.
+ /////////////////
+ File dbLockFile = file('Ghidra/.dbDirLock')
+
+ from ('Ghidra') {
+ include '.dbDirLock'
+ into 'Ghidra'
+
+ doFirst {
+ dbLockFile.withWriter { out ->
+ out.writeLine("lock file to prevent modification of core ghidra scripts")
+ }
+ }
+ doLast {
+ dbLockFile.delete()
+ }
+ }
+
+ /////////////////
+ // APPLICATION PROPERTIES
+ /////////////////
+ from (ROOT_PROJECT_DIR + "/Ghidra/application.properties") {
+ def buildDateFile = file("$buildDir/build_date.properties")
+ doFirst {
+ file("$buildDir").mkdirs()
+ buildDateFile.text = ""
+ if (rootProject.BUILD_DATES_NEEDED) {
+ buildDateFile.text += "application.build.date=" + rootProject.BUILD_DATE + "\n"
+ buildDateFile.text += "application.build.date.short=" + rootProject.BUILD_DATE_SHORT + "\n"
+ }
+ }
+ doLast {
+ delete buildDateFile
+ }
+ into "Ghidra"
+ filter (ConcatFilter, prepend: buildDateFile)
+ }
+
+
+ /////////////////
+ // JAVADOCS
+ /////////////////
+ from (zipJavadocs) {
+ into 'docs'
+ }
+
+ ////////////////
+ // Patch Readme
+ ////////////////
+ from (ROOT_PROJECT_DIR + "/GhidraBuild/patch") {
+ into "Ghidra/patch"
+ }
+}
+
+/*********************************************************************************
+ * NATIVES
+ *
+ * Creates copy tasks for each platform, to move native files to the
+ * distribution staging folder.
+ *
+ * Input: Native executables created during the build phase. It is assumed that
+ * these have already been built and are located in the proper location.
+ *
+ *********************************************************************************/
+project.OS_NAMES.each { platform ->
+ task ("assembleDistribution_$platform", type: Copy ) {
+
+ // delete the gradle ziptree temp directory because of gradle bug not cleaning up its temp files.
+ delete rootProject.file("build/tmp/expandedArchives")
+
+
+ group 'private'
+ description "Copies the platform-dependent files/folders to the distribution location."
+ destinationDir file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
+
+ // Make sure that we don't try to copy the same file with the same path into the
+ // zip (this can happen!)
+ duplicatesStrategy 'exclude'
+
+ }
+}
+
+/*********************************************************************************
+ *
+ * Copies source zips for projects to the distribution staging folder.
+ *
+ **********************************************************************************/
+task assembleSource (type: Copy) {
+ group 'private'
+ description "Copies source zips for all core projects to the distribution folder"
+ destinationDir DISTRIBUTION_DIR
+
+}
+
+
+/*********************************************************************************
+ *
+ * Creates a directory of extensions that are external from the installation zip.
+ *
+ **********************************************************************************/
+task createExternalExtensions(type: Copy) {
+
+ group 'private'
+ description "Creates directory of extensions that are external to the installation zip (does not clean up artifacts) [gradle/root/distribution.gradle]"
+
+ destinationDir new File(DISTRIBUTION_DIR.getPath(), "external_extensions")
+
+ // Make sure that we don't try to copy the same file with the same path.
+ duplicatesStrategy 'exclude'
+
+ doLast {
+ delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
+ }
+
+}
+
+import groovy.io.FileType
+import java.nio.file.Path
+import java.nio.file.Files
+import java.nio.file.attribute.FileTime
+import java.time.OffsetDateTime
+import java.util.concurrent.TimeUnit
+import java.time.ZoneId
+
+/*********************************************************************************
+ * Update sla file timestamps to current time plus timeOffsetMinutes value.
+ *
+ * distributionDirectoryPath - Contains files/folders used by gradle zip task.
+ * timeOffsetMinutes - Number of minutes to increase sla file timestamp.
+ *
+**********************************************************************************/
+def updateSlaFilesTimestamp(String distributionDirectoryPath, int timeOffsetMinutes) {
+ logger.debug("updateSlaFilesTimestamp: distributionDirectoryPath = '$distributionDirectoryPath' and timeOffsetMinutes = '$timeOffsetMinutes',")
+
+ if (timeOffsetMinutes <= 0) {
+ throw new GradleException("updateSlaFilesTimestamp: timeOffsetMinutes value of '$timeOffsetMinutes' is invalid.")
+ }
+
+ // path to sla files in distribution directory
+ def directory = new File(distributionDirectoryPath)
+
+ if (!directory.exists()) {
+ throw new GradleException("updateSlaFilesTimestamp: path to sla files '$directory' does not exist.")
+ }
+
+ OffsetDateTime dt = OffsetDateTime.now(ZoneId.of("UTC")).plusMinutes(timeOffsetMinutes);
+
+ int numFilesAdded = 0;
+
+ // For each .sla file, update timestamp attributes.
+ directory.eachFileRecurse(FileType.FILES) { file ->
+ if(file.name.endsWith('sla')) {
+ Files.setAttribute(file.toPath(), "creationTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
+ Files.setAttribute(file.toPath(), "lastModifiedTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
+ Files.setAttribute(file.toPath(), "lastAccessTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
+
+ logger.debug("updateSlaFilesTimestamp: Updating $file.name with timestamp attributes of " + new Date(file.lastModified()))
+
+ numFilesAdded++
+ }
+ }
+
+ println "updateSlaFilesTimestamp: Updated timestamps to $numFilesAdded .sla files."
+}
+
+/*********************************************************************************
+ *
+ * Creates the local installation zip.
+ *
+ **********************************************************************************/
+task createInstallationZip(type: Zip) { t ->
+
+ group 'private'
+ description "Creates local installation zip (does not clean up artifacts) [gradle/root/distribution.gradle]"
+
+ dependsOn assembleDistribution
+ dependsOn assembleSource
+ dependsOn "assembleDistribution_$currentPlatform"
+
+ if (project.hasProperty("allPlatforms")) {
+ dependsOn ":assembleDistribution_win32"
+ dependsOn ":assembleDistribution_win64"
+ dependsOn ":assembleDistribution_linux64"
+ dependsOn ":assembleDistribution_osx64"
+ dependsOn ":assembleSource"
+ }
+
+ if (project.hasProperty("allPlatforms")) {
+ archiveName "${ZIP_NAME_PREFIX}.zip"
+ }
+ else {
+ archiveName "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
+ }
+ destinationDir DISTRIBUTION_DIR
+
+ // Make sure that we don't try to copy the same file with the same path.
+ duplicatesStrategy 'exclude'
+
+ from (DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX) {
+ into ZIP_DIR_PREFIX
+ }
+
+ doFirst {
+ // We always want the extensions directory to exist in the zip, even if there's nothing
+ // installed there.
+ new File( DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX + "/Ghidra/Extensions").mkdirs()
+
+
+ // The dependent tasks copy the sla and slaspec files into "extractTo/<release name>/ghidra/"
+ // and then later to "extractTo/<release name>/dist/", which this zip task compresses. The copy
+ // tasks do not preserve the file modification times. If slaspec timestamp > sla timestamp,
+ // a sleigh compile is triggered on Ghidra app startup. Calling this method before files are zipped
+ // will ensure the zip archive has sla files newer than slaspec. Give new timestamp of now plus
+ // two minutes.
+ updateSlaFilesTimestamp(DISTRIBUTION_DIR.getPath(), 2)
+ }
+
+ doLast {
+ delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
+ }
+}
+
+
+/*********************************************************************************
+ *
+ * Builds the Ghidra installation zip file for the local platform
+ *
+ **********************************************************************************/
+task buildGhidra() {
+ description "Builds Ghidra for the current platform. The resulting zip will be in build/dist"
+
+ if (project.hasProperty("externalExtensions")) {
+ dependsOn createExternalExtensions
+ }
+ dependsOn createInstallationZip
+
+}
+
+
diff --git a/gradleScripts/eclipseFilters.gradle b/gradle/root/eclipse.gradle
similarity index 100%
rename from gradleScripts/eclipseFilters.gradle
rename to gradle/root/eclipse.gradle
diff --git a/gradleScripts/jacoco.gradle b/gradle/root/jacoco.gradle
similarity index 91%
rename from gradleScripts/jacoco.gradle
rename to gradle/root/jacoco.gradle
index 816930cac5..077ac58d85 100644
--- a/gradleScripts/jacoco.gradle
+++ b/gradle/root/jacoco.gradle
@@ -2,6 +2,14 @@
def jacoco_origin = project.hasProperty('jacoco.origin') ? project.getProperty('jacoco.origin') : "master"
import groovy.io.FileType;
+// 'jacocoEnabled' will enable jacocoMerge, jacocoBranchReport and jacocoReport if these tasks are
+// specified on the cmd line.
+// Applying jacoco plugin will create coverage files for each java Test task. This extra analysis
+// slows down the overall Test task, so only enable jacoco when specified on the cmd line.
+rootProject.ext.jacocoEnabled = (rootProject.gradle.startParameter.taskNames.contains('jacocoMerge') ||
+ rootProject.gradle.startParameter.taskNames.contains('jacocoBranchReport') ||
+ rootProject.gradle.startParameter.taskNames.contains('jacocoReport'))
+
if (project.jacocoEnabled) {
@@ -172,13 +180,13 @@ List excludesList = generateExcludesList()
* Generate the Jacoco excludes list from file (this will strip out comments and
* whitespace).
*
- * This uses 'gradleScripts/jacoco.excludes.src.txt' to generate list of
+ * This uses 'gradle/support/jacoco.excludes.src.txt' to generate list of
* class exclusions for the 'jacocoReport' task.
*
*********************************************************************************/
def String[] generateExcludesList() {
- File inputFile = new File(rootProject.projectDir, "gradleScripts/jacoco.excludes.src.txt")
+ File inputFile = new File(rootProject.projectDir, "gradle/support/jacoco.excludes.src.txt")
def lines = inputFile.readLines()
.findAll({ line ->
diff --git a/gradle/root/prepDev.gradle b/gradle/root/prepDev.gradle
new file mode 100644
index 0000000000..dc0d6f1bf9
--- /dev/null
+++ b/gradle/root/prepDev.gradle
@@ -0,0 +1,27 @@
+
+
+/******************************************************************************************
+ * PrepDev - task to prepare a development environment for Ghidra. It needs to be run
+ * whenever the Ghidra git repos are first cloned or after a 'clean'. It also
+ * needs to be run after a change to the sleigh ANTLR grammar files.
+ *******************************************************************************************/
+
+task prepDev {
+ group rootProject.GHIDRA_GROUP
+ description " Prepares a fresh clone of Ghidra for developing in eclipse. [gradle/root/prepDev.gradle]\n"
+
+ // the GhidraLauncher depends on this file to build the classpath in dev mode
+ dependsOn { generateLibraryDependencyMapping }
+}
+
+
+/******************************************************************************************
+ * TASK generateLibraryDependencyMapping
+ *
+ * Summary: Creates a file that lists the libraries used by each module.
+ ******************************************************************************************/
+task generateLibraryDependencyMapping {
+ doFirst{
+ generateLibraryDependencyMapping()
+ }
+}
\ No newline at end of file
diff --git a/gradleScripts/svg.gradle b/gradle/root/svg.gradle
similarity index 96%
rename from gradleScripts/svg.gradle
rename to gradle/root/svg.gradle
index dc3bfc6e10..dc456b4b7e 100644
--- a/gradleScripts/svg.gradle
+++ b/gradle/root/svg.gradle
@@ -16,7 +16,7 @@
*********************************************************************************/
task rasterizeSvg(type: JavaExec) {
group rootProject.GHIDRA_GROUP
- description " Converts .svg files to .png files. [gradleScripts/distribution.gradle]\n"
+ description " Converts .svg files to .png files. [gradle/root/distribution.gradle]\n"
subprojects { p ->
diff --git a/gradleScripts/test.gradle b/gradle/root/test.gradle
similarity index 78%
rename from gradleScripts/test.gradle
rename to gradle/root/test.gradle
index c791f3385c..2618d10c9b 100644
--- a/gradleScripts/test.gradle
+++ b/gradle/root/test.gradle
@@ -15,7 +15,7 @@
* aren't set by a calling script, we default them.
*
*********************************************************************************/
-apply from: "gradleScripts/testUtils.gradle"
+apply from: "gradle/support/testUtils.gradle"
configurations {
jmockitAgent
@@ -91,9 +91,12 @@ project.ext.parallelMode = project.gradle.startParameter.taskNames.contains('par
// 'parallelCombinedTestReport' task will parse a JUnit test report for test duration.
// Specify the location of the report via cmd line using "-PtestTimeParserInputDir=<location>".
-// Otherwise, the default is to look for the latest test report in <reportDir>/../reportsArchive/reports_<date>
-project.ext.testTimeParserInputDir = project.hasProperty('testTimeParserInputDir') ?
- project.getProperty('testTimeParserInputDir') + "/reports/classes" : getLastArchivedReport("$reportArchivesDir") + "/classes"
+// If the location is not specified via cmd line, it will look for the latest test report
+// in <reportDir>/../reportsArchive/reports_<date>
+// If a reportsArchive path does not exist, it will assume all tests have the same duration and
+// continue with test task creation.
+ project.ext.testTimeParserInputDir = project.hasProperty('testTimeParserInputDir') ?
+ project.getProperty('testTimeParserInputDir') + "/reports/classes" : getLastArchivedReport("$reportArchivesDir") + "/classes"
// A port of 0 will allow the kernel to give a free port number in the set of "User"
// or "Registered" Ports (usually 1024 - 49151). This will prevent port collisions among
@@ -171,30 +174,7 @@ def loadApplicationProperties() {
}
}
-/*********************************************************************************
- * Record and Print test task start time
- *********************************************************************************/
-def startTestTimer(Task task) {
- project.ext.testStartTime = new Date()
- println ":" + task.project.name + ":" + task.name + " started: " + testStartTime;
-}
-/*********************************************************************************
- * Print test task end time and elapsed time
- *********************************************************************************/
-def endTestTimer(Task task) {
- Date endTime = new Date();
- println ":" + task.project.name + ":" + task.name + " ended: " + endTime;
-
- long elapsedMS = endTime.getTime() - testStartTime.getTime();
- long msPerMin = 60 * 1000;
- long msPerHour = 60 * msPerMin;
- long hrs = elapsedMS / msPerHour;
- long mins = (elapsedMS - (hrs * msPerHour)) / msPerMin;
- long secs = (elapsedMS - (hrs * msPerHour) - (mins * msPerMin)) / 1000;
- println ":" + task.project.name + ":" + task.name + " elapsed time: " +
- String.format("%d:%02d:%02d", hrs, mins, secs);
-}
/*********************************************************************************
* Loads any machine specific property file that contains info we need.
@@ -341,45 +321,8 @@ task parallelCombinedTestReport(type: TestReport) { t ->
logger.debug("parallelCombinedTestReport: Using destinationDir = $reportDir")
dependsOn ":deleteTestTempAndReportDirs"
mustRunAfter ":deleteTestTempAndReportDirs"
-
- doFirst {
- startTestTimer(t)
- }
- doLast {
- endTestTimer(t)
- }
}
-/*********************************************************************************
- * GRADLE TEST PROPERTIES
- *
- * This is where we add the test task to each subproject, and set generic test
- * properties. These will apply to both unit and integration tests.
- *********************************************************************************/
-subprojects {
-
- test { t ->
-
- forkEvery 1
- initTestJVM(t, testRootDirName)
-
- // WARNING! WATCH OUT !!
- // WARNING! Since a single shared JVM instance is used, the first
- // test and its ApplicationConfiguration will be used to initialize
- // the class searching environment. This can have a negative impact
- // on test results due to the inconsistent Application environment
- // which may exist when all tests are run versus a single test.
- // Based on this limitation we should only use the Integration base
- // test classes within integrationTest regions (e.g., test.slow).
-
- doFirst {
- startTestTimer(t)
- }
- doLast {
- endTestTimer(t)
- }
- }
-}
/*********************************************************************************
* UNIT TEST REPORT
@@ -390,52 +333,10 @@ subprojects {
task unitTestReport(type: TestReport) { t ->
group "test"
destinationDir = file("$reportDir/unitTests")
- reportOn subprojects.test
outputs.upToDateWhen {false}
}
-/*********************************************************************************
- * PREPARE FOR TESTS
- *
- * Summary: Setup for testing.
- *********************************************************************************/
-task prepareForTests {
- dependsOn { project(":FunctionID").unpackFidDatabases }
-}
-
-/*********************************************************************************
- * INTEGRATION TEST
- *
- * Summary: Applies a task to each subproject that will run all integration
- * tests for that project.
- *
- *********************************************************************************/
-subprojects { sub ->
-
- task integrationTest (type: Test) { t ->
- group "test"
- dependsOn ':prepareForTests'
- testClassesDirs = files sub.sourceSets.integrationTest.output.classesDirs
-
- classpath = sub.sourceSets.integrationTest.runtimeClasspath
-
- // Do not include suite classes; they trigger the tests in the suite to get run twice
- // (once by normal jUnit and again when the suite runs).
- excludes = ['**/*Suite*']
-
- // Enable if you want to force Gradle to launch a new JVM for each test.
- forkEvery 1
- initTestJVM(t, testRootDirName)
-
- doFirst {
- startTestTimer(t)
- }
- doLast {
- endTestTimer(t)
- }
- }
-}
/*********************************************************************************
* Create a task of type: Test for a subproject.
@@ -481,13 +382,6 @@ def createTestTask(Project subproject, String testType, int taskNameCounter, Arr
events "started", "passed", "skipped", "failed"
}
- doFirst {
- startTestTimer(t)
- }
- doLast {
- endTestTimer(t)
- }
-
// Current task mustRunAfter previous task (test_1 before test_2,etc.)
if (taskNameCounter > 1) {
def prevTaskName = "$testType" + "_" + (taskNameCounter -1)
@@ -511,7 +405,7 @@ configure(subprojects.findAll {parallelMode == true}) { subproject ->
// "subprojects { afterEvaluate { evaluate()"
// forces evaluation of subproject configuration. Needed for inheriting excludes
// from non-parallel counterpart.
- subproject.evaluate()
+// subproject.evaluate()
if (!shouldSkipTestTaskCreation(subproject)) {
logger.info("parallelCombinedTestReport: Creating 'test' tasks for " + subproject.name + " subproject.")
@@ -549,38 +443,6 @@ configure(subprojects.findAll {parallelMode == true}) { subproject ->
} // end afterEvaluate
}// end subprojects
-/*********************************************************************************
- * NON-BASE INTEGRATION TEST REPORT
- *
- * Summary: Runs integration tests for all modules except "Base"
- * and generates a single report.
- *
- *********************************************************************************/
-task integrationTestReportNoBase(type: TestReport) { t ->
- group "test"
- destinationDir = file("$reportDir/integrationTests")
- subprojects.each {
- if (!it.name.equals("Base")) { // excludes Base module tests
- reportOn it.integrationTest
- }
- }
-}
-/*********************************************************************************
- * INTEGRATION TEST REPORT BASE ONLY
- *
- * Summary: Runs the integration tests for just the "Base" module and generates a
- * report.
- *
- *********************************************************************************/
-task integrationTestReportBaseOnly(type: TestReport) { t ->
- group "test"
- destinationDir = file("$reportDir/integrationTests")
- subprojects.each {
- if (it.name.equals("Base")) { // excludes Base module tests
- reportOn it.integrationTest
- }
- }
-}
/*********************************************************************************
* COMBINED TEST REPORT
@@ -594,57 +456,6 @@ task combinedTestReport(type: TestReport) { t ->
dependsOn ":deleteTestTempAndReportDirs"
mustRunAfter ":deleteTestTempAndReportDirs"
-
- subprojects { project ->
- afterEvaluate{
- if (isTestable(project)) {
- reportOn project.test
- reportOn project.integrationTest
- }
- }
- }
-}
-
-/*********************************************************************************
- * ALL TESTS
- *
- * Summary: Applies a task to each subproject that will run all unit tests and all
- * integration tests for that project.
- *
- *********************************************************************************/
-subprojects { sub ->
- task allTests {
- dependsOn 'integrationTest'
- dependsOn 'test'
- }
-}
-
-/*********************************************************************************
- * CUNIT TEST
- *
- * Summary: Applies a task to each "Processor Test" subproject that will run all
- * CUNIT tests for that project.
- *
- *********************************************************************************/
-subprojects { sub ->
- task cunitTest (type: Test) { t ->
- group "cunit"
- dependsOn ':prepareForTests'
- testClassesDirs = files sub.sourceSets.cunitTest.output.classesDirs
- classpath = sub.sourceSets.cunitTest.runtimeClasspath
-
- // Enable if you want to force Gradle to launch a new JVM for each test.
- forkEvery 1
-
- initTestJVM(t, cunitTestRootDirName)
-
- doFirst {
- startTestTimer(t)
- }
- doLast {
- endTestTimer(t)
- }
- }
}
/*********************************************************************************
@@ -656,7 +467,6 @@ subprojects { sub ->
task cunitTestReport(type: TestReport) { t ->
group "cunit"
destinationDir = file("$cunitTestShareDir" + "/reports")
- reportOn subprojects.cunitTest
}
/*********************************************************************************
diff --git a/gradleScripts/usage.gradle b/gradle/root/usage.gradle
similarity index 67%
rename from gradleScripts/usage.gradle
rename to gradle/root/usage.gradle
index 9ca4447d6a..db32c8c740 100644
--- a/gradleScripts/usage.gradle
+++ b/gradle/root/usage.gradle
@@ -18,17 +18,19 @@ GHIDRA GRADLE
Primary gradle tasks for Ghidra
- usage Displays this text [usage.gradle]
- prepDev Prepares development environment [prepDev.gradle]
- buildHelp Builds help [buildHelp.gradle]
- buildGhidra Builds installation for local platform. [distribution.gradle]
- compileSleigh Builds the sleigh languages [processorUtils.gradle]
+ usage Displays this text [root/usage.gradle]
+ prepDev Prepares development environment [root/prepDev.gradle]
+ buildHelp Builds help [root/buildHelp.gradle]
+ buildGhidra Builds Ghidra for the current platform [root/distribution.gradle]
+ buildGhidra -PallPlatforms Builds Ghidra for all platforms (assumes natives [root/distribution.gradle]
+ for other platforms are already built into
+ appropriate os dirs)
Task rules:
buildNative_[platform] builds the native executables and libraries for the
- specified platform (win64, linux64, osx64, etc.) [nativeBuildProperties.gradle]
+ specified platform (win64, linux64, osx64, etc.) [nativeProject.gradle]
prebuildNative_[platform] builds the native executables and libraries for the
- specified platform and copies results to bin repo. [nativeBuildProperties.gradle]
+ specified platform and copies results to bin repo. [nativeProject.gradle]
"""
}
diff --git a/gradle/support/distributionCommon.gradle b/gradle/support/distributionCommon.gradle
new file mode 100644
index 0000000000..9449380a5a
--- /dev/null
+++ b/gradle/support/distributionCommon.gradle
@@ -0,0 +1,88 @@
+apply from: "$rootProject.projectDir/gradle/support/ip.gradle"
+
+rootProject.assembleDistribution.dependsOn ip
+
+
+// all application tests depend on all the sleigh processors to be built
+tasks.withType(Test).all {
+ it.dependsOn ":allSleighCompile"
+}
+
+rootProject.OS_NAMES.each { platform ->
+ rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
+
+ def p = this.project
+
+ // the getZipPath calls here are not in closures because we are already in a taskGraph.whenReady closure
+ t.from (p.projectDir.toString() + "/build/os/$platform") {
+ exclude '*.lib'
+ exclude '*.exp'
+ into getZipPath(p) + "/os/$platform"
+ }
+ t.from (p.projectDir.toString() + "/os/$platform") {
+ into getZipPath(p) + "/os/$platform"
+ }
+ }
+}
+
+// For Win64 build, we have to also include any Win32 binaries in the final zip.
+rootProject.assembleDistribution_win64 {
+ from (this.project.projectDir.toString() + "/build/os/win32") {
+ into getZipPath(this.project) + "/os/win32"
+ }
+}
+
+plugins.withType(JavaPlugin) {
+ task zipSourceSubproject (type: Zip) { t ->
+
+ // Define some metadata about the zip (name, location, version, etc....)
+ t.group 'private'
+ t.description "Creates the source zips for java modules"
+ t.archiveName project.name + "-src.zip"
+ t.destinationDir file(projectDir.path + "/build/tmp/src")
+ // Without this we get duplicate files but it's unclear why. It doesn't seem that this
+ // task is being executed multiple times, and sourceSets.main.java contains the
+ // correct elements. Whatever the cause, this fixes the problem.
+ duplicatesStrategy 'exclude'
+
+ from sourceSets.main.java
+ }
+}
+/*********************************************************************************
+ * Takes the given file and returns a string representing the file path with everything
+ * up-to and including 'src/global' removed, as well as the filename.
+ *
+ * eg: If the file path is '/Ghidra/Configurations/Common/src/global/docs/hello.html',
+ * the returned string will be at /docs
+ *
+ * Note: We have to use 'File.separator' instead of a slash ('/') because of how
+ * windows/unix handle slashes ('/' vs. '\'). We only need to do this in cases where we're
+ * using java string manipulation libraries (eg String.replace); Gradle already
+ * understands how to use the proper slash.
+*********************************************************************************/
+String getGlobalFilePathSubDirName(File file) {
+
+ // First strip off everything before 'src/global/ in the file path.
+ def slashIndex = file.path.indexOf('src' + File.separator + 'global')
+ String filePath = file.path.substring(slashIndex);
+
+ // Now remove 'src/global/' from the string.
+ filePath = filePath.replace('src' + File.separator + 'global' + File.separator, "");
+
+ // Now we need to strip off the filename itself, which we do by finding the last
+ // instance of a slash ('/') in the string.
+ //
+ // Note that it's possible there is no slash (all we have is a filename), meaning
+ // this file will be placed at the root level.
+ //
+ slashIndex = filePath.lastIndexOf(File.separator)
+ if (slashIndex != -1) {
+ filePath = filePath.substring(0, slashIndex+1) // +1 for the slash
+ }
+ else {
+ filePath = ""
+ }
+
+ return filePath
+}
+ext.getGlobalFilePathSubDirName = this.&getGlobalFilePathSubDirName
diff --git a/gradleScripts/eclipseLauncher.gradle b/gradle/support/eclipseLauncher.gradle
similarity index 100%
rename from gradleScripts/eclipseLauncher.gradle
rename to gradle/support/eclipseLauncher.gradle
diff --git a/gradle/support/extensionCommon.gradle b/gradle/support/extensionCommon.gradle
new file mode 100644
index 0000000000..d73625b7a6
--- /dev/null
+++ b/gradle/support/extensionCommon.gradle
@@ -0,0 +1,113 @@
+import org.apache.tools.ant.filters.*
+
+task zipExtensions (type: Zip) {
+ def p = this.project
+
+ it.group 'private'
+ it.description "Creates a zip file for an extension module. [gradle/support/distribution.gradle]"
+ it.archiveName "${rootProject.ext.ZIP_NAME_PREFIX}_${p.name}.zip"
+ it.destinationDir rootProject.ext.DISTRIBUTION_DIR
+
+ // Make sure that we don't try to copy the same file with the same path into the
+ // zip (this can happen!)
+ duplicatesStrategy 'exclude'
+
+ // Exclude any files that contain "delete.me" in the path; this is a convention we used
+ // at one time that should be removed.
+ exclude "**/delete.me"
+
+ // This filtered property file copy must appear before the general
+ // copy to ensure that it is prefered over the unmodified file
+ File propFile = new File(p.projectDir, "extension.properties")
+ from (propFile) {
+ String version = "${rootProject.RELEASE_VERSION}"
+ filter (ReplaceTokens, tokens: [extversion: version])
+ into { getBaseProjectName(p) }
+ }
+
+
+ from (p.projectDir) { f ->
+ exclude 'build/**'
+ exclude 'build.gradle'
+ exclude 'certification.manifest'
+ exclude "*.project"
+ exclude "*.classpath"
+ exclude 'dist/**'
+ exclude '.gradle/**/*'
+ exclude 'ghidra_scripts/bin/'
+ exclude 'bin/**'
+ exclude 'src/**'
+ exclude 'test/**'
+ exclude 'developer_scripts'
+ exclude 'data/build.xml'
+ exclude '**/.settings/**'
+
+
+ // general place where extension modules can put files that won't get
+ // included in standard zip
+ exclude 'contribZipExclude/**'
+
+ into { getBaseProjectName(p) }
+ }
+
+ /////////////////
+ // EXTERNAL LIBS
+ /////////////////
+ gradle.taskGraph.whenReady { taskGraph ->
+ List<String> externalPaths = getExternalDependencies(p)
+ externalPaths.each { path ->
+ from (path) {
+ into { getBaseProjectName(p) + "/lib" }
+ }
+ }
+ }
+
+ /////////////////
+ // GLOBALS
+ /////////////////
+
+ // First get a list of all files that are under 'src/global'.
+ FileTree fileTree = project.fileTree('src/global') {
+ include '**/*'
+ }
+ // Now loop over each one, copying it into the zip we're creating. Each will be placed
+ // at the root level, starting with the first folder AFTER 'src/global/'.
+ //
+ // eg: If the file is '/Ghidra/Configurations/Common/src/global/docs/hello.html', then
+ // the file in the zip will be at /docs/hello.html
+ //
+ fileTree.each { File file ->
+ String filePath = getGlobalFilePathSubDirName(file)
+ from (file) {
+ into filePath
+ }
+ }
+
+ // handle special case where modules build data artifacts into the build dir
+ from (p.projectDir.toString() + "/build/data") {
+ into { getBaseProjectName(p) + "/data" }
+ }
+
+ /////////////////
+ // NATIVES
+ /////////////////
+ project.OS_NAMES.each { platform ->
+
+ from (p.projectDir.toString() + "/os/$platform") {
+ into { getBaseProjectName(p) + "/os/$platform" }
+ }
+ }
+}
+
+plugins.withType(JavaPlugin) {
+ zipExtensions {
+ def p = this.project
+ from (p.jar) {
+ // use closures for getting zip path to delay evaluation. See note at top of file.
+ into { getBaseProjectName(p) + "/lib" }
+ }
+ from (p.tasks["zipSourceSubproject"]) {
+ into { getBaseProjectName(p) + "/lib" }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gradleScripts/ip.gradle b/gradle/support/ip.gradle
similarity index 89%
rename from gradleScripts/ip.gradle
rename to gradle/support/ip.gradle
index 18a778c275..3ff23d9138 100644
--- a/gradleScripts/ip.gradle
+++ b/gradle/support/ip.gradle
@@ -17,36 +17,28 @@
/*********************************************************************************
* Defines the main ip task for each subproject
*********************************************************************************/
-subprojects {
- ext.isPureEclipseProject = false;
- ext.excludeFromBuild = false;
- task ip {
- doLast {
- if (isPureEclipseProject || excludeFromBuild) {
- // If the build.gradle file exists only to establish an
- // eclipse project or is a support project, don't verify IP.
- return;
- }
-
- // scans all the files in the module, reads ip from header, verifies ip, and creates mapping
- def ipToFileMap = getIpForModule(project)
-
- // reads the ip info from the Module.manifest file and verifies each ip
- def moduleManifestIpMap = getModuleManifestIp(project)
-
- // gets the external libs from gradle and verifies they are accounted for in the Module.manifest file
- checkExternalLibsInMap(moduleManifestIpMap, project)
-
- // adds the ip info from the Module.manifest file to the map generated from scanning the module files.
- addModuleManifestIp(ipToFileMap, moduleManifestIpMap)
-
- // writes the LICENSE.txt file for the module
- writeLicenseInfo(project, ipToFileMap)
- }
+task ip {
+ doLast {
+
+ // scans all the files in the module, reads ip from header, verifies ip, and creates mapping
+ def ipToFileMap = getIpForModule(project)
+
+ // reads the ip info from the Module.manifest file and verifies each ip
+ def moduleManifestIpMap = getModuleManifestIp(project)
+
+ // gets the external libs from gradle and verifies they are accounted for in the Module.manifest file
+ checkExternalLibsInMap(moduleManifestIpMap, project)
+
+ // adds the ip info from the Module.manifest file to the map generated from scanning the module files.
+ addModuleManifestIp(ipToFileMap, moduleManifestIpMap)
+
+ // writes the LICENSE.txt file for the module
+ writeLicenseInfo(project, ipToFileMap)
}
}
+
/*********************************************************************************
* Addes the ip information from the Module.manifest file into the ipToFileMap
*********************************************************************************/
@@ -89,11 +81,13 @@ def Map<String, String> getModuleManifestIp(Project project) {
* the map from the Module.manifest file
*********************************************************************************/
def checkExternalLibsInMap(Map<String, String> map, Project project) {
- List<String> libs = getExternalDependencies(project)
- libs.each { lib ->
- String libName = new File(lib).getName() // get just the filename without the path
- String relativePath = "lib/"+libName;
- assert map.containsKey(relativePath) : "No License specified for external library: "+relativePath+ " in module "+project.projectDir
+ if (project.plugins.withType(JavaPlugin)) {
+ List<String> libs = getExternalDependencies(project)
+ libs.each { lib ->
+ String libName = new File(lib).getName() // get just the filename without the path
+ String relativePath = "lib/"+libName;
+ assert map.containsKey(relativePath) : "No License specified for external library: "+relativePath+ " in module "+project.projectDir
+ }
}
}
@@ -120,9 +114,9 @@ def Map<String, List<String>> getIpForModule(Project p) {
exclude "build.gradle"
exclude "**/Misc/Tips.htm"
exclude "**/*.sla"
- exclude "**/data/build.xml" // language build file (generated for dev only)
exclude "**/.gradle/**"
exclude "**/.settings/**"
+ exclude "**/data/build.xml" // language build file (generated for dev only)
exclude "**/.vs/**"
exclude "**/*.vcxproj.user"
}
diff --git a/gradleScripts/jacoco.excludes.src.txt b/gradle/support/jacoco.excludes.src.txt
similarity index 99%
rename from gradleScripts/jacoco.excludes.src.txt
rename to gradle/support/jacoco.excludes.src.txt
index e04623c213..d90e136f5b 100644
--- a/gradleScripts/jacoco.excludes.src.txt
+++ b/gradle/support/jacoco.excludes.src.txt
@@ -51,6 +51,7 @@ ghidra/HelpAdapter*
ghidra/ClassSearcherStatusReportingTaskMonitor*
ghidra/app/plugin/debug/**
+
// Old/deprecated APIs
ghidra/app/program/database/oldfunction/**
ghidra/feature/vt/api/stringable/deprecated/**
diff --git a/gradleScripts/loadApplicationProperties.gradle b/gradle/support/loadApplicationProperties.gradle
similarity index 100%
rename from gradleScripts/loadApplicationProperties.gradle
rename to gradle/support/loadApplicationProperties.gradle
diff --git a/gradleScripts/settingsUtil.gradle b/gradle/support/settingsUtil.gradle
similarity index 96%
rename from gradleScripts/settingsUtil.gradle
rename to gradle/support/settingsUtil.gradle
index 02fd14c07f..8b903f65c2 100644
--- a/gradleScripts/settingsUtil.gradle
+++ b/gradle/support/settingsUtil.gradle
@@ -40,7 +40,7 @@ ext.includeProjectNamed = { name, dirName, path, mustExist ->
*
**************************************************************************************/
ext.includeProjects = { path ->
- FileTree fileTree = fileTree("../" + path) {
+ FileTree fileTree = fileTree(rootProject.projectDir.absolutePath + "/"+path) {
include '*/build.gradle'
}
fileTree.each { gradleBuildFile ->
diff --git a/gradleScripts/testUtils.gradle b/gradle/support/testUtils.gradle
similarity index 89%
rename from gradleScripts/testUtils.gradle
rename to gradle/support/testUtils.gradle
index 4da60beddf..058d473f6e 100644
--- a/gradleScripts/testUtils.gradle
+++ b/gradle/support/testUtils.gradle
@@ -53,14 +53,15 @@ def HashMap<String, Long> getTestReport() {
if (project.testReport == null) {
logger.debug("getTestReport: Populating 'testReport' using '$testTimeParserInputDir'")
- assert (testTimeParserInputDir != null && testTimeParserInputDir.contains("classes")) :
- """getTestReport: The value of 'testTimeParserInputDir' does not exist.
- Specify this value via cmd line -PtestTimeParserInputDir=<value>"""
+ testReport = new HashMap<String, Long>();
File classesReportDir = new File(testTimeParserInputDir)
- assert classesReportDir.exists() : "getTestReport: The path '$testTimeParserInputDir' does not exist on the file system"
+ if(!classesReportDir.exists()) {
+ logger.info("getTestReport: The path '$testTimeParserInputDir' does not exist on the file system." +
+ " Returning empty testReport map.")
+ return project.testReport
+ }
- testReport = new HashMap<String, Long>();
int excludedHtmlFiles = 0 // counter
int totalHtmlFiles = 0
String excludedHtmlFileNames = "" // for log.info summary message
@@ -142,7 +143,7 @@ String constructFullyQualifiedClassName(String fileContents, String fileName) {
*/
def ArrayList getTestsForSubProject(SourceDirectorySet sourceDirectorySet) {
- assert (getTestReport() != null && getTestReport().size() > 0) : "getTestsForSubProject: Problem parsing test report located at: " + testTimeParserInputDir
+ assert (getTestReport() != null) : "getTestsForSubProject: testReport should not be null"
def testsForSubProject = new LinkedHashMap<>();
@@ -226,12 +227,13 @@ def boolean shouldSkipTestTaskCreation(Project subproject) {
logger.debug("shouldSkipTestTaskCreation: Skip task creation for $subproject.name. Not in parallel mode.")
return true
}
- if (subproject.sourceSets.test.java.files.isEmpty()) {
- logger.debug("shouldSkipTestTaskCreation: Skip task creation for $subproject.name. No test sources.")
+ if (!subproject.hasProperty("sourceSets")) {
+ logger.debug("shouldSkipTestTaskCreation: subproject $subproject.name has no sourceSet property.")
return true
}
- if (!isTestable(subproject)) {
- logger.debug("shouldSkipTestTaskCreation: Skip task creation for $subproject.name. isTestable == false")
+ if (subproject.sourceSets.findByName("test") == null ||
+ subproject.sourceSets.test.java.files.isEmpty()) {
+ logger.debug("shouldSkipTestTaskCreation: Skip task creation for $subproject.name. No test sources.")
return true
}
if (subproject.findProperty("excludeFromParallelTests") ?: false) {
@@ -252,14 +254,14 @@ def boolean shouldSkipIntegrationTestTaskCreation(Project subproject) {
+ " Not in parallel mode.")
return true
}
- if (subproject.sourceSets.integrationTest.java.files.isEmpty()) {
- logger.debug("shouldSkipIntegrationTestTaskCreation: Skip task creation for $subproject.name."
- + " No integrationTest sources.")
+ if (!subproject.hasProperty("sourceSets")) {
+ logger.debug("shouldSkipIntegrationTestTaskCreation: subproject $subproject.name has no sourceSet property.")
return true
}
- if (!isTestable(subproject)) {
+ if (subproject.sourceSets.findByName("integrationTest") == null ||
+ subproject.sourceSets.integrationTest.java.files.isEmpty()) {
logger.debug("shouldSkipIntegrationTestTaskCreation: Skip task creation for $subproject.name."
- + " isTestable == false")
+ + " No integrationTest sources.")
return true
}
if (subproject.findProperty("excludeFromParallelIntegrationTests") ?: false) {
@@ -287,9 +289,10 @@ def String getLastArchivedReport(String reportArchivesPath) {
File reportArchiveDir = new File(reportArchivesPath);
logger.info("getLastArchivedReport: searching for test report to parse in " + reportArchivesPath)
- assert (reportArchiveDir.exists()) :
- """Tried to parse test report durations from archive location ' $reportArchiveDir '
- because no -PtestTimeParserInputDir=<path/to/report> supplied via cmd line"""
+ if(!reportArchiveDir.exists()) {
+ logger.info("getLastArchivedReport: '$reportArchiveDir' does not exist.")
+ return ""
+ }
// filter for report archive directories.
File[] files = reportArchiveDir.listFiles(new FilenameFilter() {
@@ -310,18 +313,9 @@ def String getLastArchivedReport(String reportArchivesPath) {
return files[0].getAbsolutePath()
}
-/*********************************************************************************
- * Returns true if subproject is not a support module.
- * These modules are commonly excluded in type:TestReport tasks.
-*********************************************************************************/
-def isTestable(Project p) {
- return !(p.findProperty("isSupportProject") ?: false)
-}
-
ext {
getTestsForSubProject = this.&getTestsForSubProject // export this utility method to project
shouldSkipTestTaskCreation = this.&shouldSkipTestTaskCreation
shouldSkipIntegrationTestTaskCreation = this.&shouldSkipIntegrationTestTaskCreation
getLastArchivedReport = this.&getLastArchivedReport
- isTestable = this.&isTestable
}
diff --git a/gradleScripts/certification.manifest b/gradleScripts/certification.manifest
deleted file mode 100644
index 9b7104d51d..0000000000
--- a/gradleScripts/certification.manifest
+++ /dev/null
@@ -1,22 +0,0 @@
-##VERSION: 2.0
-buildHelp.gradle||GHIDRA||||END|
-developerScripts.gradle||GHIDRA||||END|
-distribution.gradle||GHIDRA||||END|
-eclipseFilters.gradle||GHIDRA||||END|
-eclipseLauncher.gradle||GHIDRA||||END|
-ghidraScripts.gradle||GHIDRA||||END|
-ip.gradle||GHIDRA||||END|
-jacoco.excludes.src.txt||GHIDRA||||END|
-jacoco.gradle||GHIDRA||||END|
-loadApplicationProperties.gradle||GHIDRA||||END|
-nativeBuildProperties.gradle||GHIDRA||||END|
-old.wrapper.gradle||GHIDRA||||END|
-prepDev.gradle||GHIDRA||||END|
-processorUtils.gradle||GHIDRA||||END|
-settingsUtil.gradle||GHIDRA||||END|
-setupJacoco.gradle||GHIDRA||||END|
-setupJava.gradle||GHIDRA||||END|
-svg.gradle||GHIDRA||||END|
-test.gradle||GHIDRA||||END|
-testUtils.gradle||GHIDRA||||END|
-usage.gradle||GHIDRA||||END|
diff --git a/gradleScripts/developerScripts.gradle b/gradleScripts/developerScripts.gradle
deleted file mode 100644
index ce2e6f9fd6..0000000000
--- a/gradleScripts/developerScripts.gradle
+++ /dev/null
@@ -1,7 +0,0 @@
-sourceSets {
- scripts {
- java {
- srcDir 'developer_scripts'
- }
- }
-}
diff --git a/gradleScripts/distribution.gradle b/gradleScripts/distribution.gradle
deleted file mode 100644
index 10b6289462..0000000000
--- a/gradleScripts/distribution.gradle
+++ /dev/null
@@ -1,1200 +0,0 @@
-import org.apache.tools.ant.filters.*
-
-/*********************************************************************************
- * distribution.gradle
- *
- * This contains gradle tasks for packaging Ghidra artifacts for distribution. To
- * run a full distribution, execute either the "createLocalInstallation" or
- * "createMultiPlatformInstallation" tasks. The former will create a distribution
- * for the local platform only; the latter will create it for all available platforms.
- *
- * Note: This is included from the main build.gradle file.
- *
- *********************************************************************************/
-
- /*********************************************************************************
- * NOTE: Throughout this file, many of the "into" clauses of zip tasks are
- * enclosed within a closure. This is to delay the evaluation of the zip
- * destination path, so that subprojects have the opportunity to change that
- * path. Specifically, subprojects can specify an "extendsFromProject" property
- * which will cause the content from that project to be "overlayed" onto the
- * base project within the zip and consequently, the extracted distribution.
- * For example, if a project named "Bar" extended a project named "Foo" such
- * that in the distribution, you wanted all the files from "Foo" and "Bar" to
- * exist in a module named "Foo", you would include the following line in the
- * build.gradle file for "Bar"
- *
- * project.ext.extendsFromProject = project(':Foo')
- *
- *********************************************************************************/
-
-/********************************************************************************
- * Local Vars
- *********************************************************************************/
-def currentPlatform = getCurrentPlatformName()
-def PROJECT_DIR = file (rootProject.projectDir.absolutePath)
-def DISTRIBUTION_DIR = file("$buildDir/dist")
-def ZIP_NAME_PREFIX = "${rootProject.DISTRO_PREFIX}_${rootProject.RELEASE_NAME}_${rootProject.BUILD_DATE_SHORT}"
-ext.ZIP_DIR_PREFIX = rootProject.DISTRO_PREFIX
-
-
-FileTree javadocFiles = fileTree (rootProject.projectDir.toString()) {
- include '**/Framework/**/*.java'
- include '**/Features/Base/src/main/java/**/*.java'
- exclude '**/Features/Base/src/main/java/ghidra/app/plugin/**/*.java';
- include '**/Features/Decompiler/src/main/java/ghidra/app/decompiler/**/*.java'
- include '**/Features/Python/**/*.java'
- exclude '**/GhidraBuild/**/*.java';
- exclude '**/src/test/**'
- exclude '**/src/test.slow/**'
- exclude '**/pcodeCPort/**' // not intended for general consumption
-}
-
-/*********************************************************************************
- * JAVADOCS - RAW
- *
- * Creates javadocs for all source defined in the above 'javadocFiles' file tree.
- *
- * Note: Artifacts are placed in a temporary folder that is deleted upon
- * completion of the build.
- *
- *********************************************************************************/
-task createJavadocs(type: Javadoc, description: 'Generate javadocs for all projects', group: 'Documentation') {
-
- destinationDir = file(rootProject.projectDir.toString() + "/build/tmp/javadoc")
-
- failOnError false
-
- // Here for reference. If we want to turn on javadoc for all source files, uncomment
- // the following line (and comment out the next one):
- // source subprojects.collect { it.sourceSets.main.allJava }
- source javadocFiles
-
- // Must add classpath for main and test source sets. Javadoc will fail if it cannot
- // find referenced classes.
- classpath = files(subprojects.findAll {
- !it.name.equals("JsonDoclet") // Need to exclude this until we upgrade json-simple (hamcrest dependency issue)
- }.collect {
- it.sourceSets.main.compileClasspath
- it.sourceSets.test.compileClasspath
- })
-
- // If we don't exclude module directories, the javascript search feature doesn't work
- options.addBooleanOption("-no-module-directories", true)
-
- // Some internal packages are not public and need to be exported.
- options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
- "java.desktop/sun.awt=ALL-UNNAMED",
- "java.base/sun.security.x509=ALL-UNNAMED",
- "java.base/sun.security.provider=ALL-UNNAMED",
- "java.base/sun.security.util=ALL-UNNAMED"])
-}
-
- /*********************************************************************************
- * JSONDOCS - RAW
- *
- * Creates JSON docs for all source defined in the above 'javadocFiles' file tree.
- * These documents are used by Python to show system documentation (whereas Java will
- * use Javadoc files).
- *
- * Note: Artifacts are placed in a temporary folder that is deleted upon
- * completion of the build.
- *
- *********************************************************************************/
-
-configurations {
- jsondoc
-}
-
-dependencies {
- jsondoc project('JsonDoclet')
-}
-
-task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all projects', group: 'Documentation') {
-
- group 'private'
-
- String ROOT_PROJECT_DIR = rootProject.projectDir.toString()
-
- destinationDir = file(ROOT_PROJECT_DIR + "/build/tmp/jsondoc")
-
- failOnError false
-
- // Here for reference. If we want to turn on javadoc for all source files, uncomment
- // the following line (and comment out the next one):
- // source subprojects.collect { it.sourceSets.main.allJava }
- source javadocFiles
-
- // Must add classpath for main and test source sets. Javadoc will fail if it cannot
- // find referenced classes.
- classpath = files(subprojects.findAll {
- !it.name.equals("JsonDoclet") // Need to exclude this until we upgrade json-simple (hamcrest dependency issue)
- }.collect {
- it.sourceSets.main.compileClasspath
- it.sourceSets.test.compileClasspath
- })
-
- // Generate at package level because user may try to get help directly on an object they have
- // rather than its public interface.
- options.addBooleanOption("package", true)
-
- // Some internal packages are not public and need to be exported.
- options.addMultilineStringsOption("-add-exports").setValue(["java.desktop/sun.awt.image=ALL-UNNAMED",
- "java.desktop/sun.awt=ALL-UNNAMED",
- "java.base/sun.security.x509=ALL-UNNAMED",
- "java.base/sun.security.provider=ALL-UNNAMED",
- "java.base/sun.security.util=ALL-UNNAMED"])
-
- options.doclet = "JsonDoclet"
- doFirst {
- options.docletpath = new ArrayList(configurations.jsondoc.files)
- }
- dependsOn project('JsonDoclet').jar // Wish I didn't have to reach like this
-}
-
-/*********************************************************************************
- * JAVADOCS - ZIP
- *
- * Creates a zip file of all javadocs to be put in the release.
- *
- * Note: Artifacts are placed in a temporary folder, deleted at build completion
- *
- *********************************************************************************/
-task zipJavadocs(type: Zip) {
- group 'private'
- archiveName 'GhidraAPI_javadoc.zip'
- destinationDir file(rootProject.projectDir.toString() + "/build/tmp")
-
- from createJavadocs {
- into "api"
- }
-
- from createJsondocs {
- into "api"
- }
-
- description "Zips javadocs for Ghidra API. [gradleScripts/distribution.gradle]"
-}
-
-/*********************************************************************************
- * COMMON
- *
- * Copies all common jars and associated resources. This is basically
- * everything that is NOT an extension.
- *
- *********************************************************************************/
-task assembleCommon (type: Copy) {
-
- group 'private'
- description "Copies the common files/folders to the distribution location."
- destinationDir file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
- dependsOn {subprojects.ip}
- dependsOn {subprojects.assemble}
-
-
- // Make sure that we don't try to copy the same file with the same path.
- duplicatesStrategy 'exclude'
-
- exclude "**/certification.manifest"
- exclude "**/certification.local.manifest"
- exclude "**/.project"
- exclude "**/.classpath"
- exclude "**/delete.me"
- exclude "**/.vs/**"
- exclude "**/*.vcxproj.user"
-
- /////////////////
- // GHIDRA PROJECTS
- /////////////////
- subprojects.each { p ->
- p.afterEvaluate {
-
- boolean excludeFromBuild = p.findProperty("excludeFromBuild") ?: false;
-
- if (!excludeFromBuild && isGhidra(p) && !isExtension(p)) {
-
- if (!isEmptyProject(p)) {
- from (p.jar) {
- // use closures for getting zip path to delay evaluation. See note at top of
- //file.
- into { getZipPath(p) + "/lib" }
- }
- }
-
- from (p.projectDir.toString() + "/Module.manifest") {
- into { getZipPath(p) }
- }
-
- from (p.projectDir.toString() + "/data") {
- into { getZipPath(p) + "/data" }
- exclude 'build.xml' // associated with language modules (dev use only)
- }
-
- from (BIN_REPO + '/' + getZipPath(p) + "/data") {
- into { getZipPath(p) + "/data" }
- }
-
- from (p.projectDir.toString() + "/ghidra_scripts") {
- exclude 'bin/'
- into { getZipPath(p) + "/ghidra_scripts" }
- }
-
- from (p.projectDir.toString() + "/build/LICENSE.txt") {
- into { getZipPath(p) }
- }
-
- // handle special case where modules build data artifacts into the build dir
- from (p.projectDir.toString() + "/build/data") {
- into {getZipPath(p) + "/data" }
- }
-
- // External Libraries
- gradle.taskGraph.whenReady { taskGraph ->
- List<String> externalPaths = getExternalDependencies(p)
- externalPaths.each { path ->
- from (path) {
- into { getZipPath(p) + "/lib" }
- }
- }
- }
-
- /////////////////
- // SOURCE FOR BUILD
- //
- // Some projects require that we provide source that can be built (makefiles,
- // gradle build files, c-code, etc...). If a project has a task for that
- // purpose, execute it here.
- //
- // Note the 'afterEvaluate' call - this must be done so the zip task in the
- // subproject is added to the task graph before the 'dependsOn' clause is
- // executed. If we don't do this, that dependsOn relationship won't be respected
- // and the subproject zip task won't be executed.
- /////////////////
- p.tasks.each { t ->
- if (t.name == "zipBuildableSource") {
- assembleCommon.dependsOn {t}
- from (t) {
- into getZipPath(p)
- }
- }
- }
- }
- }
- }
-
- /////////////////////////////
- // COPY all GPL code
- /////////////////////////////
- from (ROOT_PROJECT_DIR + "/GPL") {
- exclude "*/bin"
- exclude "*/build"
- into "GPL"
- }
-
- //////////////////////////////
- // LGPL SOURCE INCLUSION
- //////////////////////////////
- from ("${rootProject.ext.BIN_REPO}/ExternalLibraries/libsSrc/jcalendar-1.3.3.zip" ) {
- into "GPL/librarySourceForLGPL"
- }
-
- //////////////////////////////
- // LICENSE SUPPORT
- //////////////////////////////
- with getMultiRepoCopySpec( "licenses", "licenses" )
- from (ROOT_PROJECT_DIR) {
- include "LICENSE.txt"
- }
-
-
- //////////////////////////////
- // LAUNCH SUPPORT
- //////////////////////////////
- from (project("LaunchSupport").jar) {
- into "support"
- }
-
- //////////////////////////////
- // SKELETON PROJECT
- //////////////////////////////
- from (ROOT_PROJECT_DIR + "/GhidraBuild/Skeleton") {
- exclude 'bin'
- exclude 'build'
- exclude 'ghidra_scripts/bin/'
- exclude '.classpath'
- exclude '.project'
- rename "buildTemplate.gradle", "build.gradle"
- into "Extensions/Ghidra/Skeleton"
- }
-
- //////////////////////////////
- // ECLIPSE SUPPORT
- //////////////////////////////
- from (BIN_REPO + "/GhidraBuild/EclipsePlugins/GhidraDev") {
- include 'GhidraDev*.zip'
- into "Extensions/Eclipse/GhidraDev/"
- }
- from (ROOT_PROJECT_DIR + "/GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin") {
- include 'GhidraDev_README.html'
- into "Extensions/Eclipse/GhidraDev/"
- }
-
- /////////////////
- // DB DIR LOCK FILE
- //
- // This lock file must be created to prevent users from modifying script files. We
- // create it here, copy it to the archive, then delete it.
- /////////////////
- File dbLockFile = file('Ghidra/.dbDirLock')
-
- from ('Ghidra') {
- include '.dbDirLock'
- into 'Ghidra'
-
- doFirst {
- dbLockFile.withWriter { out ->
- out.writeLine("lock file to prevent modification of core ghidra scripts")
- }
- }
- doLast {
- dbLockFile.delete()
- }
- }
-
- /////////////////
- // SUPPORT SCRIPTS
- /////////////////
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Common/support") {
- into "support"
- }
-
- /////////////////
- // SERVER SCRIPTS
- /////////////////
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Common/server") {
- into "server"
- }
-
- /////////////////
- // APPLICATION PROPERTIES
- /////////////////
- from (ROOT_PROJECT_DIR + "/Ghidra/application.properties") {
- def buildDateFile = file("$buildDir/build_date.properties")
- doFirst {
- file("$buildDir").mkdirs()
- buildDateFile.text = ""
- if (rootProject.BUILD_DATES_NEEDED) {
- buildDateFile.text += "application.build.date=" + rootProject.BUILD_DATE + "\n"
- buildDateFile.text += "application.build.date.short=" + rootProject.BUILD_DATE_SHORT + "\n"
- }
- }
- doLast {
- delete buildDateFile
- }
- into "Ghidra"
- filter (ConcatFilter, prepend: buildDateFile)
- }
-
- ////////////////
- // Patch Readme
- ////////////////
- from (ROOT_PROJECT_DIR + "/GhidraBuild/patch") {
- into "Ghidra/patch"
- }
-
- /////////////////
- // GLOBALS
- /////////////////
- subprojects { p ->
-
- if (!isExtension(p)) {
-
- // First get a list of all files that are under 'src/global'.
- FileTree fileTree = getGlobalFiles(p)
-
- // Now loop over each one, copying it into the zip we're creating. Each will be placed
- // at the root level, starting with the first folder AFTER 'src/global/'.
- //
- // eg: If the file is '/Ghidra/Configurations/Common/src/global/docs/hello.html', then
- // the file in the zip will be at /docs/hello.html
- //
- fileTree.each { File file ->
- String filePath = getGlobalFilePathSubDirName(file)
- from (file) {
- into filePath
- }
- }
- }
- }
-
- /////////////////
- // GHIDRA DOCS
- /////////////////
- with configure(getMultiRepoCopySpec( "GhidraDocs", "docs" )) {
- exclude "**/build.gradle"
- exclude "**/build/**"
- }
-
- /////////////////
- // IDA PRO
- /////////////////
- from (ROOT_PROJECT_DIR + "/GhidraBuild/IDAPro") {
- 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 (ROOT_PROJECT_DIR + "/GhidraBuild/IDAPro/Python/6xx/loaders/xmlldr.py") {
- into "Extensions/IDAPro/Python/6xx/plugins"
- }
-
- /////////////////
- // JAVADOCS
- /////////////////
- from (zipJavadocs) {
- into 'docs'
- }
-}
-
-/*********************************************************************************
- * COMMON - NATIVES
- *
- * Creates copy tasks for each platform, to move native files to the
- * distribution folder.
- *
- * Input: Native executables created during the build phase. It is assumed that
- * these have already been built and are located in the proper location.
- *
- *********************************************************************************/
-project.OS_NAMES.each { platform ->
- task ("assemble$platform", type: Copy ) {
-
- // Running the 'assemble' gradle task will run all compilation tasks for all languages. So
- // this must be run before executing this task.
- dependsOn {subprojects.assemble}
-
- // delete the gradle ziptree temp directory because of gradle bug not cleaning up its temp files.
- delete rootProject.file("build/tmp/expandedArchives")
-
- // get the natives for the specified platform
- subprojects { sub ->
- dependsOn { sub.tasks.findAll { it.name == "buildNatives_$platform" } }
- }
-
- group 'private'
- description "Copies the platform-dependent files/folders to the distribution location."
- destinationDir file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
-
- // Make sure that we don't try to copy the same file with the same path into the
- // zip (this can happen!)
- duplicatesStrategy 'exclude'
-
- String ROOT_PROJECT_DIR = rootProject.projectDir.toString()
-
- gradle.taskGraph.whenReady {
-
- /////////////////
- // GHIDRA PROJECTS
- /////////////////
- subprojects { p ->
- if (isGhidra(p)) {
-
- // the getZipPath calls here are not in closures because we are already in a taskGraph.whenReady closure
- from (p.projectDir.toString() + "/build/os/$platform") {
- exclude '*.lib'
- exclude '*.exp'
- into getZipPath(p) + "/os/$platform"
- }
- from (p.projectDir.toString() + "/os/$platform") {
- into getZipPath(p) + "/os/$platform"
- }
-
- // Special case for Win64 build as we have to also include the Win32 binaries
- // in the final zip.
- if (platform == "win64") {
- from (p.projectDir.toString() + "/build/os/win32") {
- into getZipPath(p) + "/os/win32"
- }
- }
- }
- }
-
- /////////////////
- // SUPPORT SCRIPTS
- /////////////////
- if( isLinux(platform) || isMac(platform) ) {
- with getMultiRepoCopySpec( "Ghidra/RuntimeScripts/Linux/support", "support" )
- }
- if( isWindows(platform) ) {
- with getMultiRepoCopySpec( "Ghidra/RuntimeScripts/Windows/support", "support" )
- }
-
- /////////////////
- // SERVER SCRIPTS
- /////////////////
- if( isLinux(platform) || isMac(platform) ) {
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Linux/server") {
- into "server"
- }
- }
- if( isWindows(platform) ) {
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Windows/server") {
- into "server"
- }
- }
-
- /////////////////
- // GHIDRA RUN SCRIPT
- /////////////////
- if( isLinux(platform) || isMac(platform) ) {
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Linux") {
- include "ghidraRun"
- }
- }
- if( isWindows(platform) ) {
- from (ROOT_PROJECT_DIR + "/Ghidra/RuntimeScripts/Windows") {
- include "ghidraRun.bat"
- }
- }
- }
- }
-}
-
-/*********************************************************************************
- * SOURCE - SUBPROJECTS
- *
- * Creates tasks for each project that will generate a zip file containing
- * all source files in that project.
- *
- * Input: Everything under the 'src/' folder.
- *
- * Output: A zip file of the form "source-<project name>.zip".
- *
- * --------------------------------------------------------------------------------
- *
- * Note: These tasks are not intended to be called directly (though they may).
- * They are utilized by the 'zipAllSource' task (defined below).
- *
- * Note2: This task MUST be placed above the zipAllSource task.
- *********************************************************************************/
-task zipSourceSubprojects {
-
- subprojects { p ->
-
- task zipSourceSubproject (type: Zip) { t ->
-
- // Define some metadata about the zip (name, location, version, etc....)
- t.group 'private'
- t.description "Creates the source zips for each module [gradleScripts/distribution.gradle]"
- t.archiveName p.name + "-src.zip"
- t.destinationDir file(p.projectDir.path + "/build/tmp/src")
-
- // Without this we get duplicate files but it's unclear why. It doesn't seem that this
- // task is being executed multiple times, and sourceSets.main.java contains the
- // correct elements. Whatever the cause, this fixes the problem.
- duplicatesStrategy 'exclude'
-
- from sourceSets.main.java
- }
- }
-}
-
-
-/*********************************************************************************
- * SOURCE - COMMON
- *
- * Copies source zips for all common projects to the distribution folder.
- *
- **********************************************************************************/
-task assembleSourceCommon (type: Copy) {
-
- group 'private'
- description "Copies source zips for all common projects to the distribution folder"
- destinationDir DISTRIBUTION_DIR
-
- // Loop over all projects and all tasks. We need to find all the dynamically-created tasks
- // that were generated by the createSourceZipTasksForProjects task. Each of these is called:
- //
- // "zipSource"
- //
- // The individual zip tasks are unique because the task name is relative to the project it
- // is a member of.
- allprojects.tasks.each { tasks ->
-
- tasks.each { task ->
-
- if (task.name.contains("zipSourceSubproject")) {
-
- if (isGhidra(task.project) && !isExtension(task.project)) {
-
- // Ensure that this task won't run until the task which generates the project
- // zip file is run.
- assembleSourceCommon.dependsOn(task)
-
- // Set the copy task info to grab all output from the given task, and place it at
- // the location just determined.
- // compute into clause in closure for delayed evaluation. See note at top of file
- assembleSourceCommon.from (task) {
- into { ZIP_DIR_PREFIX + "/" + getZipPath(task.project) + "/lib" }
- }
- }
- }
- }
- }
-
- // This forces the task that creates the project zip files to be evaluated first.
- dependsOn (zipSourceSubprojects)
-}
-
-
-/*********************************************************************************
- * CONTRIBS
- *
- * Zips up contribs and places them in the distribution folder.
- *
- * --------------------------------------------------------------------------------
- * Note: Each individual contrib should extend these tasks in their own build
- * scripts to provide additional functionality.
- *
- **********************************************************************************/
-subprojects { p ->
-
- if (isExtension(p)) {
-
- task zipExtensions (type: Zip) {
-
- it.group 'private'
- it.description "Creates a zip file for an extension module. [gradleScripts/distribution.gradle]"
- it.archiveName "${ZIP_NAME_PREFIX}_${p.name}.zip"
- it.destinationDir DISTRIBUTION_DIR
-
- // Make sure that we don't try to copy the same file with the same path into the
- // zip (this can happen!)
- duplicatesStrategy 'exclude'
-
- // Exclude any files that contain "delete.me" in the path; this is a convention we used
- // at one time that should be removed.
- exclude "**/delete.me"
-
- // This filtered property file copy must appear before the general
- // copy to ensure that it is prefered over the unmodified file
- File propFile = new File(p.projectDir, "extension.properties")
- from (propFile) {
- String version = "${rootProject.RELEASE_VERSION}"
- filter (ReplaceTokens, tokens: [extversion: version])
- into { getBaseProjectName(p) }
- }
-
- if (!isEmptyProject(p)) {
- from (p.jar) {
- // use closures for getting zip path to delay evaluation. See note at top of
- //file.
- into { getBaseProjectName(p) + "/lib" }
- }
- }
-
- from (p.projectDir) { f ->
- exclude 'build/**'
- exclude 'build.gradle'
- exclude 'certification.manifest'
- exclude "*.project"
- exclude "*.classpath"
- exclude 'dist/**'
- exclude '.gradle/**/*'
- exclude 'ghidra_scripts/bin/'
- exclude 'bin/**'
- exclude 'src/**'
- exclude 'test/**'
- exclude 'data/build.xml'
- exclude 'developer_scripts'
-
- // general place where extension modules can put files that won't get
- // included in standard zip
- exclude 'contribZipExclude/**'
-
- into { getBaseProjectName(p) }
- }
-
- /////////////////
- // SOURCE
- /////////////////
- from (tasks["zipSourceSubproject"]) {
- into { getBaseProjectName(p) + "/lib" }
- }.dependsOn(zipSourceSubprojects)
-
-
- /////////////////
- // EXTERNAL LIBS
- /////////////////
- gradle.taskGraph.whenReady { taskGraph ->
- List<String> externalPaths = getExternalDependencies(p)
- externalPaths.each { path ->
- from (path) {
- into { getBaseProjectName(p) + "/lib" }
- }
- }
- }
-
- /////////////////
- // GLOBALS
- /////////////////
- if (isExtension(p)) {
-
- // First get a list of all files that are under 'src/global'.
- FileTree fileTree = getGlobalFiles(p)
-
- // Now loop over each one, copying it into the zip we're creating. Each will be placed
- // at the root level, starting with the first folder AFTER 'src/global/'.
- //
- // eg: If the file is '/Ghidra/Configurations/Common/src/global/docs/hello.html', then
- // the file in the zip will be at /docs/hello.html
- //
- fileTree.each { File file ->
- String filePath = getGlobalFilePathSubDirName(file)
- from (file) {
- into filePath
- }
- }
- }
-
- // handle special case where modules build data artifacts into the build dir
- from (p.projectDir.toString() + "/build/data") {
- into { getBaseProjectName(p) + "/data" }
- }
-
- /////////////////
- // NATIVES
- /////////////////
- project.OS_NAMES.each { platform ->
-
- from (p.projectDir.toString() + "/os/$platform") {
- into { getBaseProjectName(p) + "/os/$platform" }
- }
- }
- }
- }
-}
-
-/*********************************************************************************
- *
- * Creates a directory of extensions that are excluded from the installation zip.
- *
- **********************************************************************************/
-task createInstallationExcludes(type: Copy) {
-
- group 'private'
- description "Creates directory of extensions that are excluded from the installation zip (does not clean up artifacts) [gradleScripts/distribution.gradle]"
-
- destinationDir new File(DISTRIBUTION_DIR.getPath(), "excluded_extensions")
-
- // Make sure that we don't try to copy the same file with the same path.
- duplicatesStrategy 'exclude'
-
- subprojects { sub ->
- afterEvaluate {
- boolean includeExtension = sub.findProperty("includeExtensionInInstallation") ?: false;
- boolean extendsFromProject = sub.hasProperty("extendsFromProject");
- if (isExtension(sub) && !includeExtension && !extendsFromProject) {
- from (sub.zipExtensions)
- }
- }
- }
-}
-
-import groovy.io.FileType
-import java.nio.file.Path
-import java.nio.file.Files
-import java.nio.file.attribute.FileTime
-import java.time.OffsetDateTime
-import java.util.concurrent.TimeUnit
-import java.time.ZoneId
-
-/*********************************************************************************
- * Update sla file timestamps to current time plus timeOffsetMinutes value.
- *
- * distributionDirectoryPath - Contains files/folders used by gradle zip task.
- * timeOffsetMinutes - Number of minutes to increase sla file timestamp.
- *
-**********************************************************************************/
-def updateSlaFilesTimestamp(String distributionDirectoryPath, int timeOffsetMinutes) {
- logger.debug("updateSlaFilesTimestamp: distributionDirectoryPath = '$distributionDirectoryPath' and timeOffsetMinutes = '$timeOffsetMinutes',")
-
- if (timeOffsetMinutes <= 0) {
- throw new GradleException("updateSlaFilesTimestamp: timeOffsetMinutes value of '$timeOffsetMinutes' is invalid.")
- }
-
- // path to sla files in distribution directory
- def directory = new File(distributionDirectoryPath)
-
- if (!directory.exists()) {
- throw new GradleException("updateSlaFilesTimestamp: path to sla files '$directory' does not exist.")
- }
-
- OffsetDateTime dt = OffsetDateTime.now(ZoneId.of("UTC")).plusMinutes(timeOffsetMinutes);
-
- int numFilesAdded = 0;
-
- // For each .sla file, update timestamp attributes.
- directory.eachFileRecurse(FileType.FILES) { file ->
- if(file.name.endsWith('sla')) {
- Files.setAttribute(file.toPath(), "creationTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
- Files.setAttribute(file.toPath(), "lastModifiedTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
- Files.setAttribute(file.toPath(), "lastAccessTime", FileTime.from(dt.toEpochSecond(), TimeUnit.SECONDS ));
-
- logger.debug("updateSlaFilesTimestamp: Updating $file.name with timestamp attributes of " + new Date(file.lastModified()))
-
- numFilesAdded++
- }
- }
-
- println "updateSlaFilesTimestamp: Updated timestamps to $numFilesAdded .sla files."
-}
-
-/*********************************************************************************
- *
- * Adds decompiler pdf documentation to zip. First, the task Decompiler:buildDecompilerDocumentationPdfs
- * creates the pdfs. Then, the pdfs to be added are specified. If the pdf file does does not exist,
- * (ex: there was an error or wrong platform) the zip task continues.
- *
- **********************************************************************************/
-def addDecompilerPdfsToZip (Task task) {
-
- task.dependsOn ':Decompiler:buildDecompilerDocumentationPdfs' // creates decompiler pdf files
-
- def decompilerPdfZipPath = ZIP_DIR_PREFIX + "/docs/languages/"
- def appProject = subprojects.find { project -> 'Decompiler' == project.name }
-
- // Add decompiler pdf files to zip. If the pdf files do not exist during execution time
- // (if there was an error or wrong platform), the zip task will move on.
- appProject.getTasksByName('buildDecompilerDocumentationPdfs', true).outputs.each { output ->
- output.files.each { file ->
- if (file.name.endsWith("pdf")) {
- logger.debug("$task.name: Adding Decompiler documentation (if it exists) $file.name to $decompilerPdfZipPath")
- task.from (file) {
- into {
- decompilerPdfZipPath
- }
- }
- }
- }
- }
-}
-
-/*********************************************************************************
- *
- * Creates the local installation zip.
- *
- **********************************************************************************/
-task createLocalInstallationZip(type: Zip) { t ->
-
- group 'private'
- description "Creates local installation zip (does not clean up artifacts) [gradleScripts/distribution.gradle]"
-
- dependsOn assembleCommon
- dependsOn assembleSourceCommon
- dependsOn "assemble$currentPlatform"
-
- addDecompilerPdfsToZip(t)
-
- archiveName "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
- destinationDir DISTRIBUTION_DIR
-
- // Make sure that we don't try to copy the same file with the same path.
- duplicatesStrategy 'exclude'
-
- from (DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX) {
- into ZIP_DIR_PREFIX
- }
-
- subprojects { sub ->
- afterEvaluate {
- boolean includeExtension = sub.findProperty("includeExtensionInInstallation") ?: false;
- if (isExtension(sub) && includeExtension) {
- from (sub.zipExtensions) {
- into {
- ZIP_DIR_PREFIX + "/Extensions/Ghidra"
- }
- }
- }
- }
- }
-
- doFirst {
- // We always want the extensions directory to exist in the zip, even if there's nothing
- // installed there.
- new File( DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX + "/Ghidra/Extensions").mkdirs()
-
- // The dependent tasks copy the sla and slaspec files into "extractTo/<release name>/ghidra/"
- // and then later to "extractTo/<release name>/dist/", which this zip task compresses. The copy
- // tasks do not preserve the file modification times. If slaspec timestamp > sla timestamp,
- // a sleigh compile is triggered on Ghidra app startup. Calling this method before files are zipped
- // will ensure the zip archive has sla files newer than slaspec. Give new timestamp of now plus
- // two minutes.
- updateSlaFilesTimestamp(DISTRIBUTION_DIR.getPath(), 2)
- }
-
- doLast {
- delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
- }
-}
-
-/*********************************************************************************
- *
- * Creates everything needed for the final distribution, for the local platform
- * only.
- *
- **********************************************************************************/
-task createLocalInstallation() {
-
- group 'private'
- description "Creates local installation (no extraction) [gradleScripts/distribution.gradle]"
-
- dependsOn createInstallationExcludes
- dependsOn createLocalInstallationZip
-
- doLast {
-
- // Delete any unnecessary artifacts used to create the final zip.
- subprojects { sub ->
- if (isExtension(sub)) {
- delete zipExtensions
- }
- }
- }
-}
-
-/*********************************************************************************
- *
- * Creates the multi-platform installation zip.
- *
- **********************************************************************************/
-task createMultiPlatformInstallationZip(type: Zip) { t ->
-
- group 'private'
- description "Creates multi-platform installation zip (does not clean up artifacts) [gradleScripts/distribution.gradle]"
-
- dependsOn ":assembleCommon"
- dependsOn ":assemblewin32"
- dependsOn ":assemblewin64"
- dependsOn ":assemblelinux64"
- dependsOn ":assembleosx64"
- dependsOn ":assembleSourceCommon"
-
- addDecompilerPdfsToZip(t)
-
- archiveName "${ZIP_NAME_PREFIX}.zip"
- destinationDir DISTRIBUTION_DIR
-
- // Make sure that we don't try to copy the same file with the same path.
- duplicatesStrategy 'exclude'
-
- from (DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX) {
- into ZIP_DIR_PREFIX
- }
-
- subprojects { sub ->
- afterEvaluate {
- boolean includeExtension = sub.findProperty("includeExtensionInInstallation") ?: false;
- if (isExtension(sub) && includeExtension) {
- from (sub.zipExtensions) {
- into {
- ZIP_DIR_PREFIX + "/Extensions/Ghidra"
- }
- }
- }
- }
- }
-
- doFirst {
- // We always want the extensions directory to exist in the zip, even if there's nothing
- // installed there.
- new File( DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX + "/Ghidra/Extensions").mkdirs()
-
- // The dependent tasks copy the sla and slaspec files into "extractTo/<release name>/ghidra/"
- // and then later to "extractTo/<release name>/dist/", which this zip task compresses. The copy
- // tasks do not preserve the file modification times. If slaspec timestamp > sla timestamp,
- // a sleigh compile is triggered on Ghidra app startup. Calling this method before files are zipped
- // will ensure the zip archive has sla files newer than slaspec. Give new timestamp of now plus
- // two minutes.
- updateSlaFilesTimestamp(DISTRIBUTION_DIR.getPath(), 2)
- }
-
- doLast {
- delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
- }
-}
-
-/*********************************************************************************
- *
- * Creates everything needed for the final distribution, for all platforms.
- *
- **********************************************************************************/
-task createMultiPlatformInstallation() {
-
- group 'private'
- description "Creates multi-platform installation (no extraction) [gradleScripts/distribution.gradle]"
-
- dependsOn createInstallationExcludes
- dependsOn createMultiPlatformInstallationZip
-
- doLast {
-
- // Delete any unnecessary artifacts used to create the final zip.
- subprojects { sub ->
- if (isExtension(sub)) {
- delete zipExtensions
- }
- }
- }
-}
-
-/*********************************************************************************
- *
- * Builds the Ghidra installation zip file for the local platform
- *
- **********************************************************************************/
-task buildGhidra() {
- dependsOn createLocalInstallationZip
-
- doLast {
-
- // Delete any unnecessary artifacts used to create the final zip.
- subprojects { sub ->
- if (isExtension(sub)) {
- delete zipExtensions
- }
- }
- }
-}
-
-/*********************************************************************************
- * Returns true if the given project is an extension.
- *********************************************************************************/
-def isExtension(Project p) {
- return p.projectDir.toString().contains(File.separator + "Extensions" + File.separator)
-}
-
-/*********************************************************************************
- * Returns true if the given project is in Ghidra.
- *********************************************************************************/
-def isGhidra(Project p) {
- return p.projectDir.toString().contains(File.separator + "Ghidra" + File.separator) ||
- p.projectDir.toString().contains(File.separator + "GPL" + File.separator)
-}
-
-/*********************************************************************************
- * Returns a FileTree of all files in the given project that are under the
- * '/src/global' folder, if there is one.
- *********************************************************************************/
-FileTree getGlobalFiles(Project project) {
-
- FileTree fileTree = project.fileTree('src/global') {
- include '**/*'
- }
-
- return fileTree
-}
-
-/*********************************************************************************
- * Takes the given file and returns a string representing the file path with everything
- * up-to and including 'src/global' removed, as well as the filename.
- *
- * eg: If the file path is '/Ghidra/Configurations/Common/src/global/docs/hello.html',
- * the returned string will be at /docs
- *
- * Note: We have to use 'File.separator' instead of a slash ('/') because of how
- * windows/unix handle slashes ('/' vs. '\'). We only need to do this in cases where we're
- * using java string manipulation libraries (eg String.replace); Gradle already
- * understands how to use the proper slash.
-*********************************************************************************/
-String getGlobalFilePathSubDirName(File file) {
-
- // First strip off everything before 'src/global/ in the file path.
- def slashIndex = file.path.indexOf('src' + File.separator + 'global')
- String filePath = file.path.substring(slashIndex);
-
- // Now remove 'src/global/' from the string.
- filePath = filePath.replace('src' + File.separator + 'global' + File.separator, "");
-
- // Now we need to strip off the filename itself, which we do by finding the last
- // instance of a slash ('/') in the string.
- //
- // Note that it's possible there is no slash (all we have is a filename), meaning
- // this file will be placed at the root level.
- //
- slashIndex = filePath.lastIndexOf(File.separator)
- if (slashIndex != -1) {
- filePath = filePath.substring(0, slashIndex+1) // +1 for the slash
- }
- else {
- filePath = ""
- }
-
- return filePath
-}
-
-/*********************************************************************************
- * Checks the project source sets to see if there are any source files and/or
- * resources.
-*********************************************************************************/
-def isEmptyProject (Project project) {
- def empty = true
- project.sourceSets.each { ss ->
- if (ss.allSource.isEmpty() == false) {
- empty = false
- }
- }
-
- return empty
-}
-
-/*********************************************************************************
- * Produces a CopySpec on the rootProject which facilitates the copying of all
- * srcFolder contents to a specified destFolder within the distribution.
- * All folder names are relative to the project root (e.g., GhidraBuild/BuildFiles).
- * The resulting CopySpec should be specified using the "with" declaration
- * for a Copy task or other similar tasks.
-*********************************************************************************/
-def getMultiRepoCopySpec(String srcFolder, String destFolder) {
- return rootProject.copySpec {
- from rootProject.projectDir.path + "/.."
- include "*/$srcFolder/**"
- exclude "**/certification.manifest"
- exclude "**/certification.local.manifest"
- exclude "**/.project"
- exclude "**/.classpath"
- exclude "**/build"
-
- eachFile {
- path = path.replaceAll(".*/$srcFolder", destFolder)
- }
- includeEmptyDirs = false
- }
-}
-
-/****************************************************************************
- * The following block of code changes the output directory for native builds
- * to <projectDir>/build/os/<platform>/<executable>
- ****************************************************************************/
-gradle.taskGraph.whenReady {
- subprojects { p->
- tasks.withType(LinkExecutable).each { t ->
- File f = t.linkedFile.getAsFile().get()
- String filename = f.getName()
- NativePlatform platform = t.targetPlatform.get()
- String osName = platform.getName()
- t.linkedFile = p.file("build/os/${osName}/$filename")
- }
- tasks.withType(LinkSharedLibrary).each { t ->
- File f = t.linkedFile.getAsFile().get()
- String filename = f.getName()
- NativePlatform platform = t.targetPlatform.get()
- String osName = platform.getName()
- t.linkedFile = p.file("build/os/${osName}/$filename")
- }
- }
-}
diff --git a/gradleScripts/ghidraScripts.gradle b/gradleScripts/ghidraScripts.gradle
deleted file mode 100644
index d67603d939..0000000000
--- a/gradleScripts/ghidraScripts.gradle
+++ /dev/null
@@ -1,7 +0,0 @@
-sourceSets {
- scripts {
- java {
- srcDir 'ghidra_scripts'
- }
- }
-}
\ No newline at end of file
diff --git a/gradleScripts/nativeBuildProperties.gradle b/gradleScripts/nativeBuildProperties.gradle
deleted file mode 100644
index 5a4291e53b..0000000000
--- a/gradleScripts/nativeBuildProperties.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-
-// These same settings are needed in the GPL native, so rather than duplicating this file, we will just call the other file
-
-def projectRootDir = rootProject.projectDir.path
-apply from: "$projectRootDir/GPL/nativeBuildProperties.gradle"
diff --git a/gradleScripts/old.wrapper.gradle b/gradleScripts/old.wrapper.gradle
deleted file mode 100644
index 60fadd7c56..0000000000
--- a/gradleScripts/old.wrapper.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-
-task wrapper(type: Wrapper) {
- gradleVersion = '2.6'
- def zipLoc = getBinLoc("Ghidra/contrib/gradle/gradle-${gradleVersion}-all.zip").toPath()
- def jarLoc = getBinLoc('Ghidra/contrib/gradle/wrapper').toPath()
- distributionUrl = jarLoc.relativize(zipLoc).toFile()
- distributionBase = Wrapper.PathBase.PROJECT
- distributionPath = ".gradle/wrapper/dists"
- archiveBase = Wrapper.PathBase.PROJECT
- archivePath = ".gradle/wrapper/dists"
- jarFile = jarLoc.resolve("gradle-wrapper-${gradleVersion}.jar").toFile()
-}
diff --git a/gradleScripts/prepDev.gradle b/gradleScripts/prepDev.gradle
deleted file mode 100644
index 9ddf86166d..0000000000
--- a/gradleScripts/prepDev.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-/******************************************************************************************
- * PrepDev - task to prepare a development environment for Ghidra. It needs to be run
- * whenever the Ghidra git repos are first cloned or after a 'clean'. It also
- * needs to be run after a change to the sleigh ANTLR grammar files.
- *
- * 1) Creates the help directories in the build directory. These directories are
- * included in the eclipse project files and must exist for eclipse to be able to compile
- * Ghidra
- *
- * 2) Builds the sleigh ANTLR code and compiles it into the 'classes' directory. Also builds
- * a src-zip of the generated java code. NOTE: this is accomplished by adding the
- * following dependency in the processorUtils.gradle file: "prepDev.dependsOn(sleighCompile)"
- * We can't do that dependency here because not all projects have a sleighCompile task.
- *
- *******************************************************************************************/
-
-subprojects {
- task prepDev {
- group rootProject.GHIDRA_GROUP
- description " Prepares a fresh clone of Ghidra for developing in eclipse. [gradleScripts/prepDev.gradle]\n"
-
- // build all help
- dependsOn { tasks.findAll { task -> task.name.equals('buildHelp') } }
-
- // make sure the antlr code in the softwareModeling module gets built
- dependsOn { project(":SoftwareModeling").compileJava }
-
- // the GhidraLauncher depends on this file to build the classpath in dev mode
- dependsOn { generateLibraryDependencyMapping }
- }
-}
-
-/******************************************************************************************
- * TASK generateLibraryDependencyMapping
- *
- * Summary: Creates a file that lists the libraries used by each module.
- ******************************************************************************************/
-task generateLibraryDependencyMapping {
- doFirst{
- generateLibraryDependencyMapping()
- }
-}
\ No newline at end of file
diff --git a/gradleScripts/setupJacoco.gradle b/gradleScripts/setupJacoco.gradle
deleted file mode 100644
index 977dcd494f..0000000000
--- a/gradleScripts/setupJacoco.gradle
+++ /dev/null
@@ -1,39 +0,0 @@
-/*********************************************************************************
- * Configuration for jacoco tasks.
- *********************************************************************************/
-
-// 'jacocoEnabled' will enable jacocoMerge, jacocoBranchReport and jacocoReport if these tasks are
-// specified on the cmd line.
-// Applying jacoco plugin will create coverage files for each java Test task. This extra analysis
-// slows down the overall Test task, so only enable jacoco when specified on the cmd line.
-project.ext.jacocoEnabled = (project.gradle.startParameter.taskNames.contains('jacocoMerge') ||
- project.gradle.startParameter.taskNames.contains('jacocoBranchReport') ||
- project.gradle.startParameter.taskNames.contains('jacocoReport'))
-
-// Apply jacoco plugin to root and subprojects. This will create coverage files for each java Test task.
-if (jacocoEnabled) {
- allprojects {
- apply plugin:'jacoco'
- dependencies {
- jacocoAnt 'org.jacoco:org.jacoco.ant:0.8.2'
- jacocoAgent 'org.jacoco:org.jacoco.agent:0.8.2'
- }
- }
-}
-
-subprojects {
- // Clean any jacoco files that may have been left behind previously.
- clean {
- doFirst{
- logger.debug("Deleting subproject jacoco execution data directory: $buildDir/jacoco/")
- file("$buildDir/jacoco/").deleteDir() // delete jacoco executionData files in individual subprojects
-
- logger.debug("Deleting root project jacoco execution data directory: $rootProject.buildDir/jacoco/")
- file("$rootProject.buildDir/jacoco/").deleteDir() // delete jacocoMerge task output
-
- logger.debug("Deleting jacoco report directory: $rootProject.buildDir/reports/jacoco/")
- file("$rootProject.buildDir/reports/jacoco/").deleteDir() // delete jacocoReport, jacocoBranchReport output
- }
- }
-}
-
diff --git a/gradleScripts/setupJava.gradle b/gradleScripts/setupJava.gradle
deleted file mode 100644
index ca42455224..0000000000
--- a/gradleScripts/setupJava.gradle
+++ /dev/null
@@ -1,137 +0,0 @@
-import org.gradle.plugins.ide.eclipse.model.Container;
-import org.gradle.plugins.ide.eclipse.model.Library;
-
-
-/*********************************************************************************
- * Subproject configuration
- * - all subs will have access to these properties.
- *********************************************************************************/
-
-subprojects {
- apply plugin: 'java'
-
- compileJava {
- options.compilerArgs << '-Xlint:none'
- options.compilerArgs << '-XDignore.symbol.file'
- options.fork = true
- options.warnings = false
- }
-
- compileTestJava {
- options.compilerArgs << '-Xlint:none'
- options.compilerArgs << '-XDignore.symbol.file'
- options.fork = true
- options.warnings = false
- }
-
- plugins.withId('java') {
- sourceCompatibility = "${rootProject.JAVA_COMPILER}"
- targetCompatibility = "${rootProject.JAVA_COMPILER}"
- }
-
-
- jar {
- manifest {
- attributes (
- "Specification-Title": "${project.name}",
- "Specification-Version": "${rootProject.RELEASE_VERSION}",
- "Specification-Vendor": "Ghidra"
- )
- }
- }
-
- sourceSets {
- main {
- java {
- srcDir 'src/main/java'
- }
- resources {
- srcDir 'src/main/resources'
- }
- }
- test {
- java {
- srcDir 'src/test/java'
- }
- resources {
- srcDir 'src/test/resources'
- }
- }
- integrationTest {
- java {
- srcDirs = ['src/test.slow/java'] // overwrite srcDir with new path
- compileClasspath += main.output + test.output
- runtimeClasspath += main.output + test.output
- }
- resources {
- srcDirs = ['src/test.slow/resources']
- }
- }
- screenShots {
- java {
- srcDir 'src/screen/java'
- compileClasspath += main.output
- runtimeClasspath += main.output
- }
- }
- cunitTest {
- java {
- srcDir 'src/test.processors/java'
- compileClasspath += main.output
- runtimeClasspath += main.output
- }
- resources {
- srcDir 'src/test.processors/resources'
- }
- }
- }
-
- configurations {
- integrationTestCompile.extendsFrom testCompile
- integrationTestRuntime.extendsFrom testRuntime, integrationTestCompile
- cunitTestCompile.extendsFrom compile
- }
-
-
- /*
- Provide test dependencies here so each build file does not have to.
- */
- dependencies {
- integrationTestCompile "org.hamcrest:hamcrest-all:1.3"
- integrationTestCompile "org.jmockit:jmockit:1.44"
-
- testCompile "org.hamcrest:hamcrest-all:1.3"
- testCompile "org.jmockit:jmockit:1.44"
-
- testCompile "junit:junit:4.12"
- }
-
- // For Java 9, we must explicitly export references to the internal classes we are using.
- // We export them to all "unnamed" modules, which are modules that don't define themselves
- // as a new Java 9 style module. Ghidra is currently using unnamed modules everywhere.
- ext.addExports = { List<String> exports ->
- tasks.withType(JavaCompile) {
- exports.each {
- options.compilerArgs.addAll(['--add-exports', it])
- }
- }
-
- eclipse.classpath.file.whenMerged { classpath ->
- classpath.entries.each { ent ->
- if (ent instanceof Container && ent.path.contains('JRE_CONTAINER')) {
- ent.entryAttributes.put('module', true);
- ent.entryAttributes.put('add-exports', exports.join(':'));
- }
- }
- }
- }
-
- afterEvaluate {
- eclipse.classpath.file.whenMerged { classpath ->
- classpath.entries.removeAll { ent ->
- ent instanceof Library && !ent.path.endsWith('.jar')
- }
- classpath.entries.findAll { entry -> entry.kind == 'lib' }*.exported = true
- }
- }
-}
diff --git a/licenses/certification.manifest b/licenses/certification.manifest
index b11781ed93..b4e51e19fb 100644
--- a/licenses/certification.manifest
+++ b/licenses/certification.manifest
@@ -6,7 +6,6 @@ Creative_Commons_Attribution_2.5.html||LICENSE||||END|
Crystal_Clear_Icons_-_LGPL_2.1.txt||LICENSE||||END|
FAMFAMFAM_Icons_-_CC_2.5.txt||LICENSE||||END|
FAMFAMFAM_Mini_Icons_-_Public_Domain.txt||LICENSE||||END|
-FAMFAMFAM Mini Icons - Public Domain.txt||LICENSE||||END|
GPL_2_With_Classpath_Exception.txt||LICENSE||||END|
JDOM_License.txt||LICENSE||||END|
Jython_License.txt||LICENSE||||END|
diff --git a/settings.gradle b/settings.gradle
index 8559ff8d3e..343276ca9d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,4 +1,4 @@
-apply from: "gradleScripts/settingsUtil.gradle"
+apply from: "gradle/support/settingsUtil.gradle"
/*******************************************************************************************
* Include all the standard Ghidra modules. See documentation below for more information
@@ -24,13 +24,9 @@ includeProject('BuildFiles', 'GhidraBuild', true)
includeProject('GhidraTest', '.', true)
includeProject('decompile', 'Ghidra/Features/Decompiler/src', true)
includeProject('RuntimeScripts', 'Ghidra', true)
-includeProject('GhidraBuild', '.', true)
+includeProject('IDAPro', 'GhidraBuild', true)
includeProject('GhidraDocs', '.', true)
-
-/*******************************************************************************************
- * Include modules that are deactivated by default
- *******************************************************************************************/
-//includeProjects('GhidraBuild/EclipsePlugins/GhidraDev') // requires Eclipse PDE
+includeProjects('GhidraBuild/EclipsePlugins/GhidraDev') // requires Eclipse PDE
/*******************************************************************************************
* Apply additional Ghidra respositories
@@ -43,8 +39,9 @@ if (extensionsList.isFile()) {
return // Skip just this one
}
File extraSettings = file("../$line/extraSettings.gradle")
- assert extraSettings.exists() : "Missing extraSettings.gradle in extension repo: $line"
- assert extraSettings.parentFile.parentFile == rootProject.projectDir.parentFile : "Extension must be sibling of ghidra repository"
- apply from: extraSettings.absolutePath
+ if (extraSettings.exists()) {
+ assert extraSettings.parentFile.parentFile == rootProject.projectDir.parentFile : "Extension must be sibling of ghidra repository"
+ apply from: extraSettings.absolutePath
+ }
}
}
\ No newline at end of file