GP-849: Gradle 7 support

This commit is contained in:
Ryan Kurtz 2021-04-12 11:07:06 -04:00
parent cb63f67a81
commit 3a0ae8ee39
84 changed files with 324 additions and 290 deletions

View file

@ -34,8 +34,8 @@ You may not need all of these, depending on which portions you are building or d
- https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot - https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot
- Amazon Corretto - Amazon Corretto
- https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html - https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
* Gradle 5.x or 6.x - We use version 5.0, and have tested with up to 6.8.3. * Gradle 6.0 or later - We use version 6.9, and tested with up to 7.0.1.
- https://gradle.org/next-steps/?version=5.0&format=bin - https://gradle.org/releases/
* A C/C++ compiler - We use GCC on Linux, Xcode (Clang) on macOS, and Visual Studio (2017 or later) on Windows. * A C/C++ compiler - We use GCC on Linux, Xcode (Clang) on macOS, and Visual Studio (2017 or later) on Windows.
- https://gcc.gnu.org/ - https://gcc.gnu.org/
- https://developer.apple.com/xcode/ - https://developer.apple.com/xcode/

View file

@ -16,7 +16,7 @@ if (findProject(':Generic') != null) {
} }
} }
else { else {
apply plugin: 'java' apply plugin: 'java-library'
} }
apply plugin: 'eclipse' apply plugin: 'eclipse'
@ -39,16 +39,14 @@ sourceSets {
} }
} }
eclipse.classpath.plusConfigurations += [configurations.dmgCompile]
repositories { repositories {
flatDir name: "flat", dirs:["data/lib"] flatDir name: "flat", dirs:["data/lib"]
} }
dependencies { dependencies {
dmgCompile ':csframework@jar' dmgImplementation ':csframework@jar'
dmgCompile ':hfsx@jar' dmgImplementation ':hfsx@jar'
dmgCompile ':hfsx_dmglib@jar' dmgImplementation ':hfsx_dmglib@jar'
} }
/*************************************************************************************** /***************************************************************************************
@ -58,6 +56,6 @@ dependencies {
***************************************************************************************/ ***************************************************************************************/
jar { jar {
destinationDir = file("build/data/lib") destinationDirectory = file("build/data/lib")
from sourceSets.dmg.output from sourceSets.dmg.output
} }

View file

@ -60,8 +60,8 @@ task zipBuildableSource(type:Zip) {
group 'private' group 'private'
description "Collects the source files needed to build this module." description "Collects the source files needed to build this module."
baseName project.name + "-src-for-build" archiveBaseName = project.name + "-src-for-build"
extension 'zip' archiveExtension = 'zip'
// //
// Version 2.33.1 // Version 2.33.1

View file

@ -22,7 +22,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug AnnotationValidator' eclipse.project.name = 'Debug AnnotationValidator'
dependencies { dependencies {
compile project(':ProposedUtils') api project(':ProposedUtils')
} }
// no-dep jar for experiments in loading annotation processor into Eclipse // no-dep jar for experiments in loading annotation processor into Eclipse

View file

@ -23,14 +23,16 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-agent-dbgeng' eclipse.project.name = 'Debug Debugger-agent-dbgeng'
dependencies { dependencies {
compile project(":Framework-AsyncComm") api project(":Framework-AsyncComm")
compile project(":Framework-Debugging") api project(":Framework-Debugging")
compile project(":Debugger-gadp") api project(":Debugger-gadp")
compile "net.java.dev.jna:jna:5.4.0" api "net.java.dev.jna:jna:5.4.0"
compile "net.java.dev.jna:jna-platform:5.4.0" api "net.java.dev.jna:jna-platform:5.4.0"
//testCompile project(":Base") //testImplementation project(":Base")
testCompile project(path: ":Debugger-gadp", configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ":Debugger-gadp", configuration: 'testArtifacts')
} }
def boolean filterJar(File jarfile) { def boolean filterJar(File jarfile) {
@ -52,7 +54,7 @@ jar {
task configureNodepJar { task configureNodepJar {
doLast { doLast {
configurations.runtime.files.forEach { configurations.runtimeOnly.files.forEach {
if (filterJar(it)) { if (filterJar(it)) {
nodepJar.from(zipTree(it)) nodepJar.from(zipTree(it))
} }

View file

@ -22,7 +22,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-agent-dbgmodel-traceloader' eclipse.project.name = 'Debug Debugger-agent-dbgmodel-traceloader'
dependencies { dependencies {
compile project(":Debugger") api project(":Debugger")
compile project(":Debugger-agent-dbgeng") api project(":Debugger-agent-dbgeng")
compile project(':Debugger-agent-dbgmodel') api project(':Debugger-agent-dbgmodel')
} }

View file

@ -23,9 +23,12 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-agent-dbgmodel' eclipse.project.name = 'Debug Debugger-agent-dbgmodel'
dependencies { dependencies {
compile project(":Debugger-agent-dbgeng") api project(":Debugger-agent-dbgeng")
testCompile project(path: ":Debugger-agent-dbgeng", configuration: 'testArtifacts') testImplementation project(path: ":Debugger-agent-dbgeng", configuration: 'testArtifacts')
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ":Debugger-gadp", configuration: 'testArtifacts')
} }
def boolean filterJar(File jarfile) { def boolean filterJar(File jarfile) {
@ -47,7 +50,7 @@ jar {
task configureNodepJar { task configureNodepJar {
doLast { doLast {
configurations.runtime.files.forEach { configurations.runtimeOnly.files.forEach {
if (filterJar(it)) { if (filterJar(it)) {
nodepJar.from(zipTree(it)) nodepJar.from(zipTree(it))
} }

View file

@ -23,12 +23,14 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-agent-gdb' eclipse.project.name = 'Debug Debugger-agent-gdb'
dependencies { dependencies {
compile project(':Framework-AsyncComm') api project(':Framework-AsyncComm')
compile project(':Framework-Debugging') api project(':Framework-Debugging')
compile project(':Debugger-gadp') api project(':Debugger-gadp')
compile 'org.python:jython-standalone:2.7.1' api 'org.python:jython-standalone:2.7.1'
testCompile project(path: ':Debugger-gadp', configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ':Debugger-gadp', configuration: 'testArtifacts')
} }
def boolean filterJar(File jarfile) { def boolean filterJar(File jarfile) {
@ -50,7 +52,7 @@ jar {
task configureNodepJar { task configureNodepJar {
doLast { doLast {
configurations.runtime.files.forEach { configurations.runtimeOnly.files.forEach {
if (filterJar(it)) { if (filterJar(it)) {
nodepJar.from(zipTree(it)) nodepJar.from(zipTree(it))
} }

View file

@ -47,12 +47,13 @@ dependencies {
protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe' protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
} }
compile 'com.google.protobuf:protobuf-java:3.11.1' api 'com.google.protobuf:protobuf-java:3.11.1'
compile project(':Framework-AsyncComm') api project(':Framework-AsyncComm')
compile project(':Framework-Debugging') api project(':Framework-Debugging')
compile project(':ProposedUtils') api project(':ProposedUtils')
testCompile project(path: ':Framework-Debugging', configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
} }
/*protobuf { /*protobuf {

View file

@ -22,9 +22,10 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-jpda' eclipse.project.name = 'Debug Debugger-jpda'
dependencies { dependencies {
compile project(':Framework-AsyncComm') api project(':Framework-AsyncComm')
compile project(':Framework-Debugging') api project(':Framework-Debugging')
compile project(':ProposedUtils') api project(':ProposedUtils')
testCompile project(path: ':Framework-Debugging', configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
} }

View file

@ -23,15 +23,16 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger' eclipse.project.name = 'Debug Debugger'
dependencies { dependencies {
compile project(':Framework-AsyncComm') api project(':Framework-AsyncComm')
compile project(':Framework-Debugging') api project(':Framework-Debugging')
compile project(':Framework-TraceModeling') api project(':Framework-TraceModeling')
compile project(':Base') api project(':Base')
compile project(':ByteViewer') api project(':ByteViewer')
compile project(':ProposedUtils') api project(':ProposedUtils')
helpPath project(path: ':Base', configuration: 'helpPath') helpPath project(path: ':Base', configuration: 'helpPath')
testCompile project(path: ':Framework-Debugging', configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testCompile project(path: ':Framework-TraceModeling', configuration: 'testArtifacts') testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts')
} }

View file

@ -22,9 +22,9 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Framework-AsyncComm' eclipse.project.name = 'Debug Framework-AsyncComm'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile project(':Graph') api project(':Graph')
compile project(':ProposedUtils') api project(':ProposedUtils')
} }
task genTestPy(type: JavaExec) { task genTestPy(type: JavaExec) {

View file

@ -23,12 +23,12 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Framework-Debugging' eclipse.project.name = 'Debug Framework-Debugging'
dependencies { dependencies {
compile project(':Framework-AsyncComm') api project(':Framework-AsyncComm')
compile project(':Generic') api project(':Generic')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
compile project(':ProposedUtils') api project(':ProposedUtils')
testCompile project(path: ':Framework-AsyncComm', configuration: 'testArtifacts') testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
} }
task testSpecimenWin64 { task testSpecimenWin64 {

View file

@ -22,11 +22,11 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Debug Framework-TraceModeling' eclipse.project.name = 'Debug Framework-TraceModeling'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
compile project(':ProposedUtils') api project(':ProposedUtils')
annotationProcessor project(':AnnotationValidator') annotationProcessor project(':AnnotationValidator')
testCompile project(':Base') testImplementation project(':Base')
testRuntime project(':ARM') // For its emulator state modifier testRuntimeOnly project(':ARM') // For its emulator state modifier
} }

View file

@ -24,16 +24,16 @@ eclipse.project.name = 'Debug ProposedUtils'
// val autoServiceVersion = "1.0-rc5" // val autoServiceVersion = "1.0-rc5"
dependencies { dependencies {
compile project(':DB') api project(':DB')
compile project(':Project') api project(':Project')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
compile project(':Utility') api project(':Utility')
compile project(':Base') // Boo!: (Where to put DefaultEnumeratedColumnProgramTableModel?) api project(':Base') // Boo!: (Where to put DefaultEnumeratedColumnProgramTableModel?)
// TODO: Evaluate these dependencies // TODO: Evaluate these dependencies
// compile("com.google.auto.service:auto-service-annotations:$autoServiceVersion") // api("com.google.auto.service:auto-service-annotations:$autoServiceVersion")
// annotationProcessor("com.google.auto.service:auto-service:$autoServiceVersion") // annotationProcessor("com.google.auto.service:auto-service:$autoServiceVersion")
testCompile project(':Base') testImplementation project(':Base')
} }

View file

@ -23,5 +23,5 @@ eclipse.project.name = 'Xtra SampleTablePlugin'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -20,5 +20,5 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Xtra SleighDevTools' eclipse.project.name = 'Xtra SleighDevTools'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -30,7 +30,7 @@ eclipse.project.name = 'Xtra Bundle Examples'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
@ -50,8 +50,8 @@ srcDirs.each {dirName ->
// create and return a jar task for the given source directory // create and return a jar task for the given source directory
def makeJarTask(dirName) { def makeJarTask(dirName) {
return tasks.create("build${dirName}", Jar) { return tasks.create("build${dirName}", Jar) {
baseName dirName archiveBaseName = dirName
archiveName "${dirName}.jar" archiveFileName = "${dirName}.jar"
ext.dirName=dirName ext.dirName=dirName
@ -91,8 +91,8 @@ eclipse {
// "$rootProject.projectDir/gradle/support/extensionCommon.gradle" // "$rootProject.projectDir/gradle/support/extensionCommon.gradle"
task zipExtensions(type: Zip, dependsOn:jarTasks) { task zipExtensions(type: Zip, dependsOn:jarTasks) {
def p = this.project def p = this.project
archiveName "${rootProject.ext.ZIP_NAME_PREFIX}_${p.name}.zip" archiveFileName = "${rootProject.ext.ZIP_NAME_PREFIX}_${p.name}.zip"
destinationDir rootProject.ext.DISTRIBUTION_DIR destinationDirectory = rootProject.ext.DISTRIBUTION_DIR
duplicatesStrategy 'exclude' duplicatesStrategy 'exclude'

View file

@ -22,5 +22,5 @@ eclipse.project.name = 'Xtra sample'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -33,28 +33,28 @@ configurations {
} }
dependencies { dependencies {
compile project(':Utility') api project(':Utility')
compile project(':Generic') api project(':Generic')
compile project(':Docking') api project(':Docking')
compile project(':Graph') api project(':Graph')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
compile project(':DB') api project(':DB')
compile project(':Help') api project(':Help')
compile 'org.apache.felix:org.apache.felix.framework:6.0.3' api 'org.apache.felix:org.apache.felix.framework:6.0.3'
compile 'com.github.rotty3000:phidias:0.3.7' api 'com.github.rotty3000:phidias:0.3.7'
compile 'biz.aQute.bnd:biz.aQute.bndlib:5.1.2' api 'biz.aQute.bnd:biz.aQute.bndlib:5.1.2'
compile 'org.slf4j:slf4j-api:1.7.25' api 'org.slf4j:slf4j-api:1.7.25'
runtime "org.slf4j:slf4j-nop:1.7.25" runtimeOnly "org.slf4j:slf4j-nop:1.7.25"
compileOnly "junit:junit:4.12" compileOnly "junit:junit:4.12"
// These have abstract test classes and stubs needed by this module // These have abstract test classes and stubs needed by this module
testCompile project(path: ':Docking', configuration: 'testArtifacts') testImplementation project(path: ':Docking', configuration: 'testArtifacts')
testCompile project(path: ':Generic', configuration: 'testArtifacts') testImplementation project(path: ':Generic', configuration: 'testArtifacts')
testCompile project(path: ':Project', configuration: 'testArtifacts') testImplementation project(path: ':Project', configuration: 'testArtifacts')
testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts') testImplementation project(path: ':SoftwareModeling', configuration: 'testArtifacts')
javacc 'net.java.dev.javacc:javacc:5.0' javacc 'net.java.dev.javacc:javacc:5.0'
} }

View file

@ -23,8 +23,8 @@ eclipse.project.name = 'Features BytePatterns'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':Utility') api project(':Utility')
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')

View file

@ -23,9 +23,9 @@ eclipse.project.name = 'Features ByteViewer'
dependencies { dependencies {
compile project(':Base') api project(':Base')
testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts') testImplementation project(path: ':SoftwareModeling', configuration: 'testArtifacts')
helpPath project(path: ':Base', configuration: 'helpPath') // this module's help has links to Base help files helpPath project(path: ':Base', configuration: 'helpPath') // this module's help has links to Base help files
} }

View file

@ -22,5 +22,5 @@ eclipse.project.name = 'Features DebugUtils'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -24,11 +24,11 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features Decompiler' eclipse.project.name = 'Features Decompiler'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
// include Base src/test/resources when running decompiler integration tests (uses defaultTools) // include Base src/test/resources when running decompiler integration tests (uses defaultTools)
integrationTestRuntime project(path: ':Base', configuration: 'testArtifacts') integrationTestImplementation project(path: ':Base', configuration: 'testArtifacts')
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
} }

View file

@ -23,8 +23,8 @@ eclipse.project.name = 'Features DecompilerDependent'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':Decompiler') api project(':Decompiler')
} }

View file

@ -23,28 +23,28 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features FileFormats' eclipse.project.name = 'Features FileFormats'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':Recognizers') api project(':Recognizers')
compile project(':Python') api project(':Python')
compile ':dex-ir:2.0' api ':dex-ir:2.0'
compile ':dex-reader:2.0' api ':dex-reader:2.0'
compile ':dex-reader-api:2.0' api ':dex-reader-api:2.0'
compile ':dex-translator:2.0' api ':dex-translator:2.0'
compile 'org.ow2.asm:asm-debug-all:4.1' api 'org.ow2.asm:asm-debug-all:4.1'
compile 'org.smali:baksmali:1.4.0' // TODO: upgrade to 2.2.6 api 'org.smali:baksmali:1.4.0' // TODO: upgrade to 2.2.6
compile 'org.smali:dexlib:1.4.0' api 'org.smali:dexlib:1.4.0'
compile 'org.smali:util:1.4.0' api 'org.smali:util:1.4.0'
compile 'net.sf.sevenzipjbinding:sevenzipjbinding:16.02-2.01' api 'net.sf.sevenzipjbinding:sevenzipjbinding:16.02-2.01'
compile ':AXMLPrinter2' api ':AXMLPrinter2'
runtime 'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:16.02-2.01' runtimeOnly 'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:16.02-2.01'
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
// include code from src/test/slow in Base // include code from src/test/slow in Base
testCompile project(path: ':Base', configuration: 'integrationTestArtifacts') testImplementation project(path: ':Base', configuration: 'integrationTestArtifacts')
} }

View file

@ -25,9 +25,9 @@ eclipse.project.name = 'Features Graph FunctionGraph'
dependencies { dependencies {
compile project(":Base") api project(":Base")
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
} }

View file

@ -22,6 +22,6 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features Graph FunctionGraphDecompilerExt' eclipse.project.name = 'Features Graph FunctionGraphDecompilerExt'
dependencies { dependencies {
compile project(":FunctionGraph") api project(":FunctionGraph")
compile project(":Decompiler") api project(":Decompiler")
} }

View file

@ -24,9 +24,9 @@ eclipse.project.name = 'Features FunctionID'
dependencies { dependencies {
compile project(":Base") api project(":Base")
compile project(":DB") api project(":DB")
compile project(":SoftwareModeling") api project(":SoftwareModeling")
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
} }

View file

@ -28,9 +28,9 @@ configurations {
} }
dependencies { dependencies {
compile project(":FileSystem") api project(":FileSystem")
compile project(":DB") api project(":DB")
compile project(":Generic") api project(":Generic")
runGhidraServer project runGhidraServer project
} }

View file

@ -23,5 +23,5 @@ eclipse.project.name = 'Features GnuDemangler'
dependencies { dependencies {
compile project(":Base") api project(":Base")
} }

View file

@ -25,7 +25,7 @@ eclipse.project.name = 'Features Graph FunctionCalls'
// Note: this module's name is 'GraphFunctionCalls' // Note: this module's name is 'GraphFunctionCalls'
dependencies { dependencies {
compile project(":Base") api project(":Base")
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
@ -35,7 +35,7 @@ dependencies {
helpPath project(path: ":FunctionGraph", configuration: 'helpPath') helpPath project(path: ":FunctionGraph", configuration: 'helpPath')
// These have abstract test classes and stubs needed by this module // These have abstract test classes and stubs needed by this module
testCompile project(path: ':Project', configuration: 'testArtifacts') testImplementation project(path: ':Project', configuration: 'testArtifacts')
testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts') testImplementation project(path: ':SoftwareModeling', configuration: 'testArtifacts')
} }

View file

@ -24,26 +24,26 @@ eclipse.project.name = 'Features Graph Services'
dependencies { dependencies {
compile project(":Base") api project(":Base")
// jungrapht - exclude slf4j which produces a conflict with other uses with Ghidra // jungrapht - exclude slf4j which produces a conflict with other uses with Ghidra
compile ("com.github.tomnelson:jungrapht-visualization:1.2") { exclude group: "org.slf4j", module: "slf4j-api" } api ("com.github.tomnelson:jungrapht-visualization:1.2") { exclude group: "org.slf4j", module: "slf4j-api" }
compile ("com.github.tomnelson:jungrapht-layout:1.2") { exclude group: "org.slf4j", module: "slf4j-api" } api ("com.github.tomnelson:jungrapht-layout:1.2") { exclude group: "org.slf4j", module: "slf4j-api" }
compile "org.jgrapht:jgrapht-core:1.5.0" api "org.jgrapht:jgrapht-core:1.5.0"
// not using jgrapht-io code that depends on antlr, so exclude antlr // not using jgrapht-io code that depends on antlr, so exclude antlr
compile ("org.jgrapht:jgrapht-io:1.5.0") { exclude group: "org.antlr", module: "antlr4-runtime" } api ("org.jgrapht:jgrapht-io:1.5.0") { exclude group: "org.antlr", module: "antlr4-runtime" }
runtime "org.slf4j:slf4j-api:1.7.25" runtimeOnly "org.slf4j:slf4j-api:1.7.25"
// use this if you want no slf4j log messages // use this if you want no slf4j log messages
runtime "org.slf4j:slf4j-nop:1.7.25" runtimeOnly "org.slf4j:slf4j-nop:1.7.25"
// use this if you want slf4j log messages sent to log4j // use this if you want slf4j log messages sent to log4j
// runtime "org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" // runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:2.12.1"
runtime "org.jheaps:jheaps:0.13" runtimeOnly "org.jheaps:jheaps:0.13"
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')

View file

@ -22,6 +22,6 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features MicrosoftCodeAnalyzer' eclipse.project.name = 'Features MicrosoftCodeAnalyzer'
dependencies { dependencies {
compile project(":MicrosoftDmang") api project(":MicrosoftDmang")
compile project(":Base") api project(":Base")
} }

View file

@ -23,6 +23,6 @@ eclipse.project.name = 'Features MicrosoftDemangler'
dependencies { dependencies {
compile project(":Base") api project(":Base")
compile project(":MicrosoftDmang") api project(":MicrosoftDmang")
} }

View file

@ -25,7 +25,7 @@ project.ext.excludeFromParallelTests = true
project.ext.excludeFromParallelIntegrationTests = true project.ext.excludeFromParallelIntegrationTests = true
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
/* /*

View file

@ -28,16 +28,16 @@ eclipse.project.name = 'Features PDB'
* Build dependencies * Build dependencies
*********************************************************************************/ *********************************************************************************/
dependencies { dependencies {
compile project(":Base") api project(":Base")
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
// Demangler Analyzer needs to find MicrosoftDemangler // Demangler Analyzer needs to find MicrosoftDemangler
compile project(":MicrosoftDemangler") api project(":MicrosoftDemangler")
helpPath project(path: ':Base', configuration: 'helpPath') // this module's help has links to Base help files helpPath project(path: ':Base', configuration: 'helpPath') // this module's help has links to Base help files
testCompile project(path: ':Base', configuration: 'testArtifacts') testImplementation project(path: ':Base', configuration: 'testArtifacts')
testCompile project(path: ':SoftwareModeling', configuration: 'testArtifacts') testImplementation project(path: ':SoftwareModeling', configuration: 'testArtifacts')
} }
/** /**

View file

@ -24,7 +24,7 @@ eclipse.project.name = 'Features ProgramDiff'
dependencies { dependencies {
compile project(":Base") api project(":Base")
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
} }

View file

@ -24,7 +24,7 @@ eclipse.project.name = 'Features Graph ProgramGraph'
dependencies { dependencies {
compile project(":Base") api project(":Base")
helpPath project(path: ":Base", configuration: 'helpPath') helpPath project(path: ":Base", configuration: 'helpPath')
helpPath project(path: ":GraphServices", configuration: 'helpPath') helpPath project(path: ":GraphServices", configuration: 'helpPath')

View file

@ -31,10 +31,10 @@ configurations {
} }
dependencies { dependencies {
compile project(':Base') api project(':Base')
helpPath project(path: ":Base", configuration: "helpPath") helpPath project(path: ":Base", configuration: "helpPath")
jython JYTHON jython JYTHON
compile JYTHON api JYTHON
} }
task jythonUnpack(type: Copy) { task jythonUnpack(type: Copy) {

View file

@ -22,7 +22,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features Recognizers' eclipse.project.name = 'Features Recognizers'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
test { test {

View file

@ -23,7 +23,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Features SourceCodeLookup' eclipse.project.name = 'Features SourceCodeLookup'
dependencies { dependencies {
compile project(":Base") api project(":Base")
compile project(":Decompiler") api project(":Decompiler")
helpPath project(path: ":Decompiler", configuration: 'helpPath') helpPath project(path: ":Decompiler", configuration: 'helpPath')
} }

View file

@ -25,10 +25,10 @@ eclipse.project.name = 'Features VersionTracking'
project.ext.excludeFromParallelIntegrationTests = true project.ext.excludeFromParallelIntegrationTests = true
dependencies { dependencies {
compile project(":Base") api project(":Base")
helpPath project(path: ":Base", configuration: "helpPath") helpPath project(path: ":Base", configuration: "helpPath")
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
testCompile project(path: ':Project', configuration: 'testArtifacts') testImplementation project(path: ':Project', configuration: 'testArtifacts')
} }

View file

@ -22,6 +22,6 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework DB' eclipse.project.name = 'Framework DB'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
} }

View file

@ -22,16 +22,16 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework Docking' eclipse.project.name = 'Framework Docking'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile 'net.java.dev.timingframework:timingframework:1.0' api 'net.java.dev.timingframework:timingframework:1.0'
// Only include this debug version of the jh library if necessary. // Only include this debug version of the jh library if necessary.
//compile name:'jh2.with.debug' //api name:'jh2.with.debug'
compile 'javax.help:javahelp:2.0.05' api 'javax.help:javahelp:2.0.05'
// include code from src/test in Generic // include code from src/test in Generic
testCompile project(path: ':Generic', configuration: 'testArtifacts') testImplementation project(path: ':Generic', configuration: 'testArtifacts')
compileOnly "junit:junit:4.12" compileOnly "junit:junit:4.12"
} }

View file

@ -22,10 +22,10 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework FileSystem' eclipse.project.name = 'Framework FileSystem'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile project(':DB') api project(':DB')
compile project(':Docking') api project(':Docking')
compile "ch.ethz.ganymed:ganymed-ssh2:262@jar" api "ch.ethz.ganymed:ganymed-ssh2:262@jar"
} }

View file

@ -24,17 +24,17 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework Generic' eclipse.project.name = 'Framework Generic'
dependencies { dependencies {
compile project(':Utility') api project(':Utility')
compile "cglib:cglib-nodep:2.2" api "cglib:cglib-nodep:2.2"
compile "com.google.guava:guava:19.0" api "com.google.guava:guava:19.0"
compile "org.jdom:jdom-legacy:1.1.3" api "org.jdom:jdom-legacy:1.1.3"
compile "org.apache.logging.log4j:log4j-api:2.12.1" api "org.apache.logging.log4j:log4j-api:2.12.1"
compile "org.apache.logging.log4j:log4j-core:2.12.1" api "org.apache.logging.log4j:log4j-core:2.12.1"
compile "org.apache.commons:commons-collections4:4.1" api "org.apache.commons:commons-collections4:4.1"
compile "org.apache.commons:commons-lang3:3.9" api "org.apache.commons:commons-lang3:3.9"
compile "org.apache.commons:commons-text:1.6" api "org.apache.commons:commons-text:1.6"
compile "commons-io:commons-io:2.6" api "commons-io:commons-io:2.6"
compile "com.google.code.gson:gson:2.8.6" api "com.google.code.gson:gson:2.8.6"
compileOnly "junit:junit:4.12" compileOnly "junit:junit:4.12"
} }

View file

@ -22,21 +22,21 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework Graph' eclipse.project.name = 'Framework Graph'
dependencies { dependencies {
compile project(':Docking') api project(':Docking')
// these are not used by the project, but indirectly by the jars listed below // these are not used by the project, but indirectly by the jars listed below
compile "net.sf.jung:jung-api:2.1.1" // used by jung-graph-impl api "net.sf.jung:jung-api:2.1.1" // used by jung-graph-impl
compile "net.sf.jung:jung-algorithms:2.1.1" // used by jung-visualization api "net.sf.jung:jung-algorithms:2.1.1" // used by jung-visualization
// this project uses these directly // this project uses these directly
compile "net.sf.jung:jung-graph-impl:2.1.1" api "net.sf.jung:jung-graph-impl:2.1.1"
compile "net.sf.jung:jung-visualization:2.1.1" api "net.sf.jung:jung-visualization:2.1.1"
compile "org.jgrapht:jgrapht-core:1.5.0" api "org.jgrapht:jgrapht-core:1.5.0"
// not using jgrapht-io code that depends on antlr, so exclude antlr // not using jgrapht-io code that depends on antlr, so exclude antlr
compile ("org.jgrapht:jgrapht-io:1.5.0") { exclude group: "org.antlr", module: "antlr4-runtime" } api ("org.jgrapht:jgrapht-io:1.5.0") { exclude group: "org.antlr", module: "antlr4-runtime" }
// These have abstract test classes and stubs needed by this module // These have abstract test classes and stubs needed by this module
testCompile project(path: ':Docking', configuration: 'testArtifacts') testImplementation project(path: ':Docking', configuration: 'testArtifacts')
} }

View file

@ -22,9 +22,9 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework Help' eclipse.project.name = 'Framework Help'
dependencies { dependencies {
compile project(':Utility') api project(':Utility')
compile project(':Docking') api project(':Docking')
// compile name:'jh' - provided by Docking // api name:'jh' - provided by Docking
} }

View file

@ -22,13 +22,13 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Framework Project' eclipse.project.name = 'Framework Project'
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile project(':DB') api project(':DB')
compile project(':Docking') api project(':Docking')
compile project(':FileSystem') api project(':FileSystem')
compile project(':Utility') api project(':Utility')
testCompile project(path: ':Generic', configuration: 'testArtifacts') testImplementation project(path: ':Generic', configuration: 'testArtifacts')
compile "org.apache.commons:commons-compress:1.19" api "org.apache.commons:commons-compress:1.19"
} }

View file

@ -28,19 +28,19 @@ apply plugin: 'antlr'
rootProject.prepDev.dependsOn compileJava rootProject.prepDev.dependsOn compileJava
dependencies { dependencies {
compile project(':Generic') api project(':Generic')
compile project(':FileSystem') api project(':FileSystem')
compile project(':Project') api project(':Project')
compile project(':Graph') api project(':Graph')
compile "msv:msv:20050913" api "msv:msv:20050913"
compile "msv:xsdlib:20050913" api "msv:xsdlib:20050913"
compile "org.antlr:antlr-runtime:3.5.2" api "org.antlr:antlr-runtime:3.5.2"
runtime "msv:relaxngDatatype:20050913" runtimeOnly "msv:relaxngDatatype:20050913"
compile "msv:isorelax:20050913" api "msv:isorelax:20050913"
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
// Must specify the specific antlr implementation to use or it will default to trying to find // 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) // version 2.7.7 (which we don't have)

View file

@ -25,5 +25,5 @@ eclipse.project.name = 'Processors 68000'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -21,5 +21,5 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors 8051' eclipse.project.name = 'Processors 8051'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -27,6 +27,6 @@ sleighCompileOptions = [
] ]
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':BytePatterns') api project(':BytePatterns')
} }

View file

@ -22,5 +22,5 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors ARM' eclipse.project.name = 'Processors ARM'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -22,7 +22,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors Atmel' eclipse.project.name = 'Processors Atmel'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
sleighCompileOptions = [ sleighCompileOptions = [

View file

@ -22,6 +22,6 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors DATA' eclipse.project.name = 'Processors DATA'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':SoftwareModeling') api project(':SoftwareModeling')
} }

View file

@ -27,6 +27,6 @@ sleighCompileOptions = [
] ]
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':FileFormats') api project(':FileFormats')
} }

View file

@ -25,5 +25,5 @@ sleighCompileOptions = [
] ]
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -26,6 +26,6 @@ eclipse.project.name = 'Processors JVM'
apply from: "$rootProject.projectDir/gradle/processorProject.gradle" apply from: "$rootProject.projectDir/gradle/processorProject.gradle"
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -22,7 +22,7 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors MIPS' eclipse.project.name = 'Processors MIPS'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
sleighCompileOptions = [ sleighCompileOptions = [

View file

@ -23,6 +23,6 @@ eclipse.project.name = 'Processors PIC'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -24,7 +24,7 @@ eclipse.project.name = 'Processors PowerPC'
dependencies { dependencies {
compile project(':Base') api project(':Base')
compile project(':BytePatterns') api project(':BytePatterns')
} }

View file

@ -22,5 +22,5 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors RISCV' eclipse.project.name = 'Processors RISCV'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -23,6 +23,6 @@ eclipse.project.name = 'Processors Sparc'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -22,5 +22,5 @@ apply plugin: 'eclipse'
eclipse.project.name = 'Processors SuperH4' eclipse.project.name = 'Processors SuperH4'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -21,6 +21,6 @@ eclipse.project.name = 'Processors Toy'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -23,5 +23,5 @@ eclipse.project.name = 'Processors tricore'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -23,6 +23,6 @@ eclipse.project.name = 'Processors x86'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }

View file

@ -17,7 +17,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
defaultTasks 'buildExtension' defaultTasks 'buildExtension'
apply plugin: 'java' apply plugin: 'java-library'
/***************************************************************************************** /*****************************************************************************************
* *
@ -48,9 +48,9 @@ compileJava {
} }
dependencies { dependencies {
compile fileTree(dir: 'lib', include: "*.jar") api fileTree(dir: 'lib', include: "*.jar")
compile fileTree(dir: ghidraDir + '/Framework', include: "**/*.jar") api fileTree(dir: ghidraDir + '/Framework', include: "**/*.jar")
compile fileTree(dir: ghidraDir + '/Features', include: "**/*.jar") api fileTree(dir: ghidraDir + '/Features', include: "**/*.jar")
helpPath fileTree(dir: ghidraDir + '/Features/Base', include: "**/Base.jar") helpPath fileTree(dir: ghidraDir + '/Features/Base', include: "**/Base.jar")
} }
@ -75,8 +75,8 @@ task zipSource (type: Zip) {
task buildExtension (type: Zip) { task buildExtension (type: Zip) {
baseName "${ZIP_NAME_PREFIX}_${project.name}" archiveBaseName = "${ZIP_NAME_PREFIX}_${project.name}"
extension 'zip' archiveExtension = 'zip'
destinationDir DISTRIBUTION_DIR destinationDir DISTRIBUTION_DIR
version '' version ''
@ -152,7 +152,7 @@ task buildExtension (type: Zip) {
} }
doLast { doLast {
println "\nCreated " + baseName + "." + extension + " in " + destinationDir println "\nCreated " + archiveBaseName + "." + archiveExtension + " in " + destinationDir
} }
} }

View file

@ -33,6 +33,10 @@ sourceSets {
} }
} }
processIntegrationTestResources {
duplicatesStrategy = 'exclude'
}
dependencies { dependencies {
// integrationtest module may depend on other projects in this repo; add them // integrationtest module may depend on other projects in this repo; add them
// here // here
@ -46,15 +50,15 @@ dependencies {
projectPath.contains("/Features/") || projectPath.contains("/Features/") ||
projectPath.contains("/Processors/"))) { projectPath.contains("/Processors/"))) {
compile p api p
} }
} }
} }
// some tests use classes in Base/src/test and test.slow // some tests use classes in Base/src/test and test.slow
testCompile project(path: ':Base', configuration: 'testArtifacts') testImplementation project(path: ':Base', configuration: 'testArtifacts')
testCompile project(path: ':Base', configuration: 'integrationTestArtifacts') testImplementation project(path: ':Base', configuration: 'integrationTestArtifacts')
testCompile project(path: ':FunctionGraph', configuration: 'testArtifacts') testImplementation project(path: ':FunctionGraph', configuration: 'testArtifacts')
} }
// For Java 9, we must explicitly export references to the internal classes we are using. // For Java 9, we must explicitly export references to the internal classes we are using.

View file

@ -2,7 +2,7 @@ application.name=Ghidra
application.version=10.0 application.version=10.0
application.release.name=DEV application.release.name=DEV
application.layout.version=1 application.layout.version=1
application.gradle.min=5.0 application.gradle.min=6.0
application.java.min=11 application.java.min=11
application.java.max= application.java.max=
application.java.compiler=11 application.java.compiler=11

View file

@ -16,10 +16,10 @@
apply plugin: 'eclipse' apply plugin: 'eclipse'
eclipse.project.name = '_JsonDoclet' eclipse.project.name = '_JsonDoclet'
apply plugin: 'java' apply plugin: 'java-library'
dependencies { dependencies {
compile "com.google.code.gson:gson:2.8.6" api "com.google.code.gson:gson:2.8.6"
} }
rootProject.createJsondocs.dependsOn jar rootProject.createJsondocs.dependsOn jar

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
apply plugin: 'java' apply plugin: 'java-library'
//This project requires the eclpse PDE plugin. To create eclipse files for this project, run //This project requires the eclpse PDE plugin. To create eclipse files for this project, run
// "gradle eclipse -PeclipsePDE" // "gradle eclipse -PeclipsePDE"
@ -48,8 +48,8 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
dependencies { dependencies {
compile project(':Utility') api project(':Utility')
compile project(':LaunchSupport') api project(':LaunchSupport')
} }
// We are currently building this with Eclipse, so prevent gradle from trying. // We are currently building this with Eclipse, so prevent gradle from trying.

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
apply plugin: 'java' apply plugin: 'java-library'
apply plugin: 'eclipse' apply plugin: 'eclipse'
eclipse.project.name = '_LaunchSupport' eclipse.project.name = '_LaunchSupport'

View file

@ -20,7 +20,7 @@ apply plugin: 'eclipse'
eclipse.project.name = '_Skeleton' eclipse.project.name = '_Skeleton'
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
// We don't want this to build // We don't want this to build
@ -37,5 +37,6 @@ rootProject.assembleDistribution {
exclude '.project' exclude '.project'
rename "buildTemplate.gradle", "build.gradle" rename "buildTemplate.gradle", "build.gradle"
into "Extensions/Ghidra/Skeleton" into "Extensions/Ghidra/Skeleton"
duplicatesStrategy = 'include'
} }
} }

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
apply plugin: 'java' apply plugin: 'java-library'
apply plugin: 'eclipse' apply plugin: 'eclipse'
eclipse.project.name = '_GhidraDocs' eclipse.project.name = '_GhidraDocs'
@ -26,7 +26,7 @@ sourceSets {
} }
dependencies { dependencies {
compile project(':Base') api project(':Base')
} }
rootProject.assembleDistribution { rootProject.assembleDistribution {

View file

@ -38,7 +38,7 @@ To create the latest development build for your platform from this source reposi
##### Install build tools: ##### Install build tools:
* [JDK 11 64-bit][jdk11] * [JDK 11 64-bit][jdk11]
* [Gradle][gradle] (version 5.x or 6.x) * [Gradle][gradle] (minimum v6.0)
* make, gcc, and g++ (Linux/macOS-only) * make, gcc, and g++ (Linux/macOS-only)
* [Microsoft Visual Studio][vs] (Windows-only) * [Microsoft Visual Studio][vs] (Windows-only)

View file

@ -315,13 +315,20 @@ String getCurrentPlatformName() {
List<String> getExternalRuntimeDependencies(Project project) { List<String> getExternalRuntimeDependencies(Project project) {
List<String> list = new ArrayList<String>() List<String> list = new ArrayList<String>()
list.addAll(getExternalDependencies(project.configurations.compile)); if (project.configurations.find { it.name == 'api' }) {
list.addAll(getExternalDependencies(project.configurations.runtime)); list.addAll(getExternalDependencies(project, project.configurations.api));
}
if (project.configurations.find { it.name == 'implementation' }) {
list.addAll(getExternalDependencies(project, project.configurations.implementation));
}
if (project.configurations.find { it.name == 'runtimeOnly' }) {
list.addAll(getExternalDependencies(project, project.configurations.runtimeOnly));
}
return list return list
} }
List<String> getExternalDependencies(Configuration configuration) { List<String> getExternalDependencies(Project project, Configuration configuration) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
configuration.dependencies.each { dep -> configuration.dependencies.each { dep ->
@ -345,8 +352,11 @@ List<String> getExternalDependencies(Configuration configuration) {
} }
// loop back through all the dependency files, looking for one that contains the dependency name. // loop back through all the dependency files, looking for one that contains the dependency name.
String depPath = configuration.find { String depPath = project.configurations
it.name.contains(searchString) .findAll {it.isCanBeResolved()}
.collect {it.resolve()}
.flatten()
.find {it.getAbsolutePath().contains(searchString)
} }
if (depPath == null) { if (depPath == null) {
println("****************DID NOT FIND DEPENDENCY: name = "+name+" version = "+version) println("****************DID NOT FIND DEPENDENCY: name = "+name+" version = "+version)
@ -369,7 +379,7 @@ Set<String> getAllExternalDependencies(Project project) {
Set<String> set = new HashSet<String>() Set<String> set = new HashSet<String>()
project.getConfigurations().each { config -> project.getConfigurations().each { config ->
set.addAll(getExternalDependencies(config)) set.addAll(getExternalDependencies(project, config))
} }
return set return set

View file

@ -59,8 +59,8 @@ sourceSets {
} }
dependencies { dependencies {
helpIndexCompile "javax.help:javahelp:2.0.05" helpIndexImplementation "javax.help:javahelp:2.0.05"
helpIndexCompile project(path: ':Help', configuration: 'archives') helpIndexImplementation project(':Help')
} }
// Task for calling the java help indexer, which creates a searchable index of the // Task for calling the java help indexer, which creates a searchable index of the
@ -193,6 +193,7 @@ jar {
} }
// build the help whenever this module's jar file is built // build the help whenever this module's jar file is built
processResources.dependsOn buildHelp
jar.dependsOn buildHelp jar.dependsOn buildHelp

View file

@ -31,7 +31,7 @@ import org.gradle.plugins.ide.eclipse.model.Library;
* - all subs will have access to these properties. * - all subs will have access to these properties.
*********************************************************************************/ *********************************************************************************/
apply plugin: 'java' apply plugin: 'java-library'
compileJava { compileJava {
options.compilerArgs << '-Xlint:none' options.compilerArgs << '-Xlint:none'
@ -47,6 +47,14 @@ compileTestJava {
options.warnings = false options.warnings = false
} }
processResources {
duplicatesStrategy = 'exclude'
}
processTestResources {
duplicatesStrategy = 'exclude'
}
plugins.withId('java') { plugins.withId('java') {
sourceCompatibility = "${rootProject.JAVA_COMPILER}" sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}" targetCompatibility = "${rootProject.JAVA_COMPILER}"
@ -120,12 +128,12 @@ sourceSets {
} }
configurations { configurations {
integrationTestCompile.extendsFrom testCompile integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime, integrationTestCompile integrationTestRuntimeOnly.extendsFrom testRuntimeOnly, integrationTestImplementation
pcodeTestCompile.extendsFrom compile pcodeTestImplementation.extendsFrom implementation
testArtifacts.extendsFrom testRuntime testArtifacts.extendsFrom testRuntimeOnly
integrationTestArtifacts.extendsFrom integrationTestRuntime integrationTestArtifacts.extendsFrom integrationTestRuntimeOnly
screenShotsCompile.extendsFrom integrationTestCompile screenShotsImplementation.extendsFrom integrationTestImplemenation
} }
task testJar(type: Jar) { task testJar(type: Jar) {
@ -147,14 +155,14 @@ artifacts {
Provide test dependencies here so each build file does not have to. Provide test dependencies here so each build file does not have to.
*/ */
dependencies { dependencies {
integrationTestCompile "org.hamcrest:hamcrest-all:1.3" integrationTestImplementation "org.hamcrest:hamcrest-all:1.3"
integrationTestCompile "org.jmockit:jmockit:1.44" integrationTestImplementation "org.jmockit:jmockit:1.44"
testCompile "org.hamcrest:hamcrest-all:1.3" testImplementation "org.hamcrest:hamcrest-all:1.3"
testCompile "org.jmockit:jmockit:1.44" testImplementation "org.jmockit:jmockit:1.44"
testCompile "junit:junit:4.12" testImplementation "junit:junit:4.12"
pcodeTestCompile "junit:junit:4.12" pcodeTestImplementation "junit:junit:4.12"
} }
// For Java 9, we must explicitly export references to the internal classes we are using. // For Java 9, we must explicitly export references to the internal classes we are using.
@ -190,10 +198,12 @@ eclipse.classpath.file.whenMerged { classpath ->
// Prevent Gradle 5.6 from setting the 'test' attribute on our test source folders and jars. // Prevent Gradle 5.6 from setting the 'test' attribute on our test source folders and jars.
// If we don't do this, things that we have outside of test directories that depend on test // If we don't do this, things that we have outside of test directories that depend on test
// libraries (like junit) will not compile in Eclipse. // libraries (like junit) will not compile in Eclipse.
// Also prevent Gradle 7.0 from adding jars to the modulepath instead of the classpath.
classpath.entries.findAll { classpath.entries.findAll {
it.kind == 'src' || it.kind == 'lib' it.kind == 'src' || it.kind == 'lib'
}.each { }.each {
it.entryAttributes['test'] = 'false' it.entryAttributes['test'] = 'false'
it.entryAttributes['module'] = 'false'
} }
} }

View file

@ -119,7 +119,7 @@ def getGitRev(repoPath) {
*********************************************************************************/ *********************************************************************************/
task createJavadocs(type: Javadoc, description: 'Generate javadocs for all projects', group: 'Documentation') { task createJavadocs(type: Javadoc, description: 'Generate javadocs for all projects', group: 'Documentation') {
destinationDir = file(rootProject.projectDir.toString() + "/build/tmp/javadoc") destinationDir file(rootProject.projectDir.toString() + "/build/tmp/javadoc")
failOnError false failOnError false
@ -177,7 +177,7 @@ task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all proj
String ROOT_PROJECT_DIR = rootProject.projectDir.toString() String ROOT_PROJECT_DIR = rootProject.projectDir.toString()
destinationDir = file(ROOT_PROJECT_DIR + "/build/tmp/jsondoc") destinationDir file(ROOT_PROJECT_DIR + "/build/tmp/jsondoc")
failOnError false failOnError false
@ -222,8 +222,8 @@ task createJsondocs(type: Javadoc, description: 'Generate JSON docs for all proj
*********************************************************************************/ *********************************************************************************/
task zipJavadocs(type: Zip) { task zipJavadocs(type: Zip) {
group 'private' group 'private'
archiveName 'GhidraAPI_javadoc.zip' archiveFileName = 'GhidraAPI_javadoc.zip'
destinationDir file(rootProject.projectDir.toString() + "/build/tmp") destinationDirectory = file(rootProject.projectDir.toString() + "/build/tmp")
from createJavadocs { from createJavadocs {
into "api" into "api"
@ -233,7 +233,7 @@ task zipJavadocs(type: Zip) {
into "api" into "api"
} }
description "Zips javadocs for Ghidra API. [gradle/root/distribution.gradle]" description "Zips javadocs for Ghidra api. [gradle/root/distribution.gradle]"
} }
@ -491,12 +491,12 @@ task createInstallationZip(type: Zip) { t ->
} }
if (project.hasProperty("allPlatforms")) { if (project.hasProperty("allPlatforms")) {
archiveName "${ZIP_NAME_PREFIX}.zip" archiveFileName = "${ZIP_NAME_PREFIX}.zip"
} }
else { else {
archiveName "${ZIP_NAME_PREFIX}_${currentPlatform}.zip" archiveFileName = "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
} }
destinationDir DISTRIBUTION_DIR destinationDirectory = DISTRIBUTION_DIR
// Make sure that we don't try to copy the same file with the same path. // Make sure that we don't try to copy the same file with the same path.
duplicatesStrategy 'exclude' duplicatesStrategy 'exclude'

View file

@ -26,8 +26,8 @@ plugins.withType(JavaPlugin) {
// Define some metadata about the zip (name, location, version, etc....) // Define some metadata about the zip (name, location, version, etc....)
t.group 'private' t.group 'private'
t.description "Creates the source zips for java modules" t.description "Creates the source zips for java modules"
t.archiveName project.name + "-src.zip" t.archiveFileName = project.name + "-src.zip"
t.destinationDir file(projectDir.path + "/build/tmp/src") t.destinationDirectory = file(projectDir.path + "/build/tmp/src")
// Without this we get duplicate files but it's unclear why. It doesn't seem that this // 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 // task is being executed multiple times, and sourceSets.main.java contains the
// correct elements. Whatever the cause, this fixes the problem. // correct elements. Whatever the cause, this fixes the problem.

View file

@ -20,8 +20,8 @@ task zipExtensions (type: Zip) {
it.group 'private' it.group 'private'
it.description "Creates a zip file for an extension module. [gradle/support/extensionCommon.gradle]" it.description "Creates a zip file for an extension module. [gradle/support/extensionCommon.gradle]"
it.archiveName "${rootProject.ext.ZIP_NAME_PREFIX}_${p.name}.zip" it.archiveFileName = "${rootProject.ext.ZIP_NAME_PREFIX}_${p.name}.zip"
it.destinationDir rootProject.ext.DISTRIBUTION_DIR it.destinationDirectory = rootProject.ext.DISTRIBUTION_DIR
// Make sure that we don't try to copy the same file with the same path into the // Make sure that we don't try to copy the same file with the same path into the
// zip (this can happen!) // zip (this can happen!)