From 0d333c7d881eb9f048e375384a86cf8f25ad7047 Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Wed, 5 Jan 2022 14:55:17 +0800 Subject: [PATCH] build: stop using local Eclipse as a part of dependency This change makes it possible to build Eclipse plugins without local Eclipse IDE. It is also possible to use metadata of artifacts (pom.xml) to maintain license, vulnerability, and version of dependencies. close #1868 --- spotbugs/build.gradle | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/spotbugs/build.gradle b/spotbugs/build.gradle index 9a2c47f0c29..170b7f54714 100644 --- a/spotbugs/build.gradle +++ b/spotbugs/build.gradle @@ -150,25 +150,16 @@ eclipse.classpath.file { } } -def copyLibsForEclipse = tasks.register('copyLibsForEclipse', Copy) { - from configurations.testCompileClasspath, configurations.testRuntimeClasspath, configurations.guiRuntimeClasspath, configurations.guiCompileClasspath, configurations.logBinding - into ".libs" - include "*.jar" - exclude "*xml-apis*.jar" - exclude "*spotbugs-annotations*.jar" - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - def updateManifest = tasks.register('updateManifest') { inputs.file "$projectDir/META-INF/MANIFEST-TEMPLATE.MF" outputs.file "$projectDir/META-INF/MANIFEST.MF" - dependsOn configurations.runtimeClasspath, copyLibsForEclipse + dependsOn configurations.runtimeClasspath doLast { def manifestSpec = manifest { from "$projectDir/META-INF/MANIFEST-TEMPLATE.MF" attributes 'Main-Class': 'edu.umd.cs.findbugs.LaunchAppropriateUI', 'Bundle-Version': project.version.replace('-', '.'), - 'Bundle-ClassPath': 'spotbugs.jar,' + fileTree(dir: '.libs').collect { projectDir.toPath().relativize(it.toPath()).toString() }.join(',') + 'Bundle-ClassPath': 'spotbugs.jar,' + configurations.runtimeClasspath.collect { it.name }.join(',') } // write manifests manifestSpec.writeTo("$projectDir/META-INF/MANIFEST.MF")