Major refactoring of the gradle build system.

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

View File

@@ -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"

View File

@@ -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|

View File

@@ -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'
/*********************************************************************************

View File

@@ -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|

View File

@@ -1,4 +1,7 @@
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'GPL DemanglerGnu'
apply from: "../nativeBuildProperties.gradle"

View File

@@ -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|

View File

@@ -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")
}
}