From 26e4999e737cfccca9ed37612dba09d485ddeee1 Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Fri, 4 Jun 2021 16:22:11 -0400 Subject: [PATCH] GP-1002: Fixing Debugger nodepJar issues. --- Ghidra/Debug/AnnotationValidator/build.gradle | 34 ------------------- .../Debug/Debugger-agent-dbgeng/build.gradle | 7 ++++ .../Debugger-agent-dbgmodel/build.gradle | 6 ++++ Ghidra/Debug/Debugger-agent-gdb/build.gradle | 6 ++++ 4 files changed, 19 insertions(+), 34 deletions(-) diff --git a/Ghidra/Debug/AnnotationValidator/build.gradle b/Ghidra/Debug/AnnotationValidator/build.gradle index a92ab6b4a8..ef909550c3 100644 --- a/Ghidra/Debug/AnnotationValidator/build.gradle +++ b/Ghidra/Debug/AnnotationValidator/build.gradle @@ -24,37 +24,3 @@ eclipse.project.name = 'Debug AnnotationValidator' dependencies { api project(':ProposedUtils') } - -// no-dep jar for experiments in loading annotation processor into Eclipse -def boolean filterJar(File jarfile) { - if (jarfile.name.contains("gradle-api")) { - return false - } else if (jarfile.name.contains("groovy-all")) { - return false - } else if (jarfile.name.contains("gradle-installation-beacon")) { - return false - } - return true -} - -task configureNodepJar { - doLast { - configurations.runtime.files.forEach { - if (filterJar(it)) { - nodepJar.from(zipTree(it)) { - exclude("META-INF/**") - } - } - } - } -} - -task nodepJar(type: Jar) { - inputs.file(file(jar.archivePath)) - dependsOn(configureNodepJar) - dependsOn(jar) - - appendix = 'nodep' - - from(zipTree(jar.archivePath)) -} diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/build.gradle b/Ghidra/Debug/Debugger-agent-dbgeng/build.gradle index 2560c95650..836b3ef00b 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/build.gradle +++ b/Ghidra/Debug/Debugger-agent-dbgeng/build.gradle @@ -53,6 +53,8 @@ jar { } task configureNodepJar { + dependsOn(configurations.default) + doLast { configurations.default.files.forEach { if (filterJar(it)) { @@ -73,6 +75,11 @@ task nodepJar(type: Jar) { } from(zipTree(jar.archivePath)) + // TODO: This kind of stinks. I could probably apply some judicious excludes + // images I don't care. + // I probably must include duplicate LICENSE files, so that all are included + // IDK why the duplicate OSGi framework classes, but I probably don't care. + duplicatesStrategy = 'include' } test { diff --git a/Ghidra/Debug/Debugger-agent-dbgmodel/build.gradle b/Ghidra/Debug/Debugger-agent-dbgmodel/build.gradle index 008eb22639..5fe088d111 100644 --- a/Ghidra/Debug/Debugger-agent-dbgmodel/build.gradle +++ b/Ghidra/Debug/Debugger-agent-dbgmodel/build.gradle @@ -49,6 +49,7 @@ jar { } task configureNodepJar { + dependsOn(configurations.default) doLast { configurations.default.files.forEach { if (filterJar(it)) { @@ -69,6 +70,11 @@ task nodepJar(type: Jar) { } from(zipTree(jar.archivePath)) + // TODO: This kind of stinks. I could probably apply some judicious excludes + // images I don't care. + // I probably must include duplicate LICENSE files, so that all are included + // IDK why the duplicate OSGi framework classes, but I probably don't care. + duplicatesStrategy = 'include' } test { diff --git a/Ghidra/Debug/Debugger-agent-gdb/build.gradle b/Ghidra/Debug/Debugger-agent-gdb/build.gradle index 99e10ed498..b69137869c 100644 --- a/Ghidra/Debug/Debugger-agent-gdb/build.gradle +++ b/Ghidra/Debug/Debugger-agent-gdb/build.gradle @@ -51,6 +51,7 @@ jar { } task configureNodepJar { + dependsOn(configurations.default) doLast { configurations.default.files.forEach { if (filterJar(it)) { @@ -71,6 +72,11 @@ task nodepJar(type: Jar) { } from(zipTree(jar.archivePath)) + // TODO: This kind of stinks. I could probably apply some judicious excludes + // images I don't care. + // I probably must include duplicate LICENSE files, so that all are included + // IDK why the duplicate OSGi framework classes, but I probably don't care. + duplicatesStrategy = 'include' } task executableJar {