GP-4685: Fixing Gradle warnings

This commit is contained in:
Ryan Kurtz 2024-06-12 10:04:40 -04:00
parent 715a8ba335
commit d0b29b0dab
13 changed files with 37 additions and 29 deletions

View File

@ -35,10 +35,12 @@ sourceSets {
// this dependency block is needed for this code to compile in our eclipse environment. It is not needed
// for the gradle build
dependencies {
implementation project(':BSim')
}
libsDirName='ziplayout'
base {
libsDirectory = file('ziplayout')
}
task copyGenericTask(type: Copy) {
from project(':Generic').file('src/main/java')

View File

@ -123,7 +123,7 @@ task zipExtensions(type: Zip, dependsOn:jarTasks) {
include "scripts_*.jar"
for(jarTask in jarTasks) {
from relativePath(jarTask.archivePath)
from relativePath(jarTask.archiveFile.getAsFile())
exclude jarTask.dirName
}

View File

@ -18,8 +18,10 @@ eclipse.project.name = '_JsonDoclet'
apply plugin: 'java-library'
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
java {
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
}
dependencies {
api "com.google.code.gson:gson:2.9.0"

View File

@ -15,8 +15,10 @@
*/
apply plugin: 'java-library'
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
java {
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
}
//This project requires the eclpse PDE plugin. To create eclipse files for this project, run
// "gradle eclipse -PeclipsePDE"

View File

@ -19,8 +19,10 @@ 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.8
targetCompatibility = 1.8
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
jar {
manifest {

View File

@ -17,8 +17,10 @@ apply plugin: 'java-library'
apply plugin: 'eclipse'
eclipse.project.name = '_GhidraDocs'
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
java {
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
}
sourceSets {
ghidraClass {

View File

@ -18,7 +18,7 @@ apply from: "$rootProject.projectDir/gradle/debugger/hasNodepJar.gradle"
task executableJar {
ext.execsh = file("src/main/sh/execjar.sh")
ext.jarfile = file(nodepJar.archivePath)
ext.jarfile = nodepJar.archiveFile
ext.outjar = file("${buildDir}/bin/run")
dependsOn(nodepJar)
inputs.file { execsh }

View File

@ -50,12 +50,12 @@ task configureNodepJar {
}
task nodepJar(type: Jar) {
inputs.file(file(jar.archivePath))
inputs.file(jar.archiveFile)
dependsOn(configureNodepJar)
dependsOn(jar)
archiveAppendix = 'nodep'
from(zipTree(jar.archivePath))
from(zipTree(jar.archiveFile))
duplicatesStrategy = 'exclude'
}

View File

@ -55,7 +55,7 @@ processTestResources {
duplicatesStrategy = 'exclude'
}
plugins.withId('java') {
java {
sourceCompatibility = "${rootProject.JAVA_COMPILER}"
targetCompatibility = "${rootProject.JAVA_COMPILER}"
}

View File

@ -95,17 +95,17 @@ task pcodeTest (type: Test) { t ->
}
rootProject.unitTestReport {
reportOn this.project.test
testResults.from(this.project.test)
}
rootProject.integrationTestReport {
reportOn this.project.integrationTest
testResults.from(this.project.integrationTest)
}
rootProject.pcodeTestReport {
reportOn this.project.pcodeTest
testResults.from(this.project.pcodeTest)
}
rootProject.combinedTestReport {
reportOn this.project.test
reportOn this.project.integrationTest
testResults.from(this.project.test)
testResults.from(this.project.integrationTest)
}

View File

@ -89,7 +89,7 @@ task jacocoReport(type: JacocoReport, group: 'Coverage reports') {
reports {
html {
required
destination new File(rootDir.absolutePath + "/jacocoReport")
outputLocation = new File(rootDir.absolutePath + "/jacocoReport")
}
xml { }
}

View File

@ -369,7 +369,7 @@ def initTestJVM(Task task, String rootDirName) {
*********************************************************************************/
task parallelCombinedTestReport(type: TestReport) { t ->
group "test"
destinationDir = file("$reportDir")
destinationDirectory = file("$reportDir")
logger.debug("parallelCombinedTestReport: Using destinationDir = $reportDir")
dependsOn ":deleteTestTempAndReportDirs"
mustRunAfter ":deleteTestTempAndReportDirs"
@ -385,7 +385,7 @@ task parallelCombinedTestReport(type: TestReport) { t ->
task unitTestReport(type: TestReport) { t ->
group "test"
description "Run unit tests and save HTML report."
destinationDir = file("$reportDir/unitTests")
destinationDirectory = file("$reportDir/unitTests")
outputs.upToDateWhen {false}
}
@ -398,7 +398,7 @@ task unitTestReport(type: TestReport) { t ->
task integrationTestReport(type: TestReport) { t ->
group "test"
description "Run integration tests and save HTML report."
destinationDir = file("$reportDir/integrationTests")
destinationDirectory = file("$reportDir/integrationTests")
outputs.upToDateWhen {false}
}
@ -416,7 +416,7 @@ task integrationTestReport(type: TestReport) { t ->
task targetedTestReport(type: TestReport) { t ->
group "test"
description "Run unit tests against a specific set of projects."
destinationDir = file("$reportDir/unitTests")
destinationDirectory = file("$reportDir/unitTests")
outputs.upToDateWhen {false}
dependsOn ":deleteTestTempAndReportDirs"
@ -560,7 +560,7 @@ configure(subprojects.findAll {parallelMode == true}) { subproject ->
*********************************************************************************/
task combinedTestReport(type: TestReport) { t ->
group "test"
destinationDir = file("$reportDir")
destinationDirectory = file("$reportDir")
dependsOn ":deleteTestTempAndReportDirs"
mustRunAfter ":deleteTestTempAndReportDirs"
@ -574,7 +574,7 @@ task combinedTestReport(type: TestReport) { t ->
*********************************************************************************/
task pcodeTestReport(type: TestReport) { t ->
group "pcodeTest"
destinationDir = file("$pcodeTestShareDir" + "/reports")
destinationDirectory = file("$pcodeTestShareDir" + "/reports")
}
/*********************************************************************************

View File

@ -37,11 +37,9 @@ includeProject('JsonDoclet', 'GhidraBuild/BuildFiles', true)
includeProject('LaunchSupport', 'GhidraBuild', true)
includeProject('Skeleton', 'GhidraBuild', true)
includeProject('BuildFiles', 'GhidraBuild', true)
includeProject('GhidraTest', '.', true)
includeProject('decompile', 'Ghidra/Features/Decompiler/src', true)
includeProject('RuntimeScripts', 'Ghidra', true)
includeProject('IDAPro', 'GhidraBuild', true)
includeProject('NativeSupport', 'GhidraBuild', true)
includeProject('GhidraDocs', '.', true)
includeProjects('GhidraBuild/EclipsePlugins/GhidraDev') // requires Eclipse PDE
includeProjects('GhidraBuild/EclipsePlugins/GhidraSleighEditor') // requires Eclipse DSL