From 424689331907c14b161f7dfba6b13fb48da335f9 Mon Sep 17 00:00:00 2001 From: Mark Jaffe Date: Fri, 21 Aug 2020 14:06:10 -0700 Subject: [PATCH 1/4] Fix this so it will work in android --- build.gradle | 5 +++-- pom.xml | 2 +- src/test/build.gradle | 2 +- src/test/settings.gradle | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 10f92f8..17f5c6c 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ plugins { repositories { jcenter() mavenCentral() + mavenLocal() maven { url 'https://jitpack.io' } @@ -23,8 +24,8 @@ dependencies { compile 'org.apache.maven:maven-core:3.5.0' } -group = 'com.cyclonedx' -version = '1.2.0-SNAPSHOT' +group = 'org.cyclonedx' +version = '1.2.0' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/pom.xml b/pom.xml index bed492b..55d8bd4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.cyclonedx cyclonedx-gradle-plugin jar - 1.2.0-SNAPSHOT + 1.2.0 CycloneDX Gradle Plugin The CycloneDX Gradle plugin creates an aggregate of all direct and transitive dependencies of a project and creates a valid CycloneDX bill-of-materials document from the results. CycloneDX is a lightweight BOM specification that is easily created, human readable, and simple to parse. diff --git a/src/test/build.gradle b/src/test/build.gradle index 66412c1..fed5aef 100644 --- a/src/test/build.gradle +++ b/src/test/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.cyclonedx.bom' version '1.1.0' apply true + id 'org.cyclonedx.bom' version '1.2.0' apply true } apply plugin: 'java' diff --git a/src/test/settings.gradle b/src/test/settings.gradle index 7165409..80b6c8b 100644 --- a/src/test/settings.gradle +++ b/src/test/settings.gradle @@ -2,7 +2,7 @@ pluginManagement { resolutionStrategy { eachPlugin { if (requested.id.toString() == 'org.cyclonedx.bom') { - useModule('org.cyclonedx:cyclonedx-gradle-plugin:1.1.0') + useModule('org.cyclonedx:cyclonedx-gradle-plugin:1.2.0') } } } From fd06276cddb603c7befa7ba4dcd5a166f0c4e5aa Mon Sep 17 00:00:00 2001 From: Mark Jaffe Date: Tue, 1 Sep 2020 13:00:31 -0700 Subject: [PATCH 2/4] Use latest gradle.plugin-publish --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 17f5c6c..9ed7066 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-gradle-plugin' - id 'com.gradle.plugin-publish' version '0.10.1' + id 'com.gradle.plugin-publish' version '0.12.0' id 'maven-publish' } From 44df8c279b5275cae114fd694da81d627c4b4ec0 Mon Sep 17 00:00:00 2001 From: Mark Jaffe Date: Thu, 3 Sep 2020 14:39:19 -0700 Subject: [PATCH 3/4] Update publish plugin, cyclonedx-core-java; tweaks to make it work --- build.gradle | 6 +++--- pom.xml | 2 +- src/main/java/org/cyclonedx/gradle/CycloneDxTask.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 9ed7066..0a71e21 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ repositories { } dependencies { - compile(group: 'org.cyclonedx', name: 'cyclonedx-core-java', version: '3.0.1') { + compile(group: 'org.cyclonedx', name: 'cyclonedx-core-java', version: '3.0.5') { // gradle-api already includes an slf4j binding exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' } @@ -24,7 +24,7 @@ dependencies { compile 'org.apache.maven:maven-core:3.5.0' } -group = 'org.cyclonedx' +group = 'com.cyclonedx' version = '1.2.0' sourceCompatibility = JavaVersion.VERSION_1_8 @@ -43,7 +43,7 @@ pluginBundle { gradlePlugin { plugins { cycloneDxPlugin { - id = 'org.cyclonedx.bom' + id = 'com.cyclonedx.bom' displayName = 'CycloneDX BOM Generator' description = 'The CycloneDX Gradle plugin creates an aggregate of all direct and transitive dependencies of a project and creates a valid CycloneDX bill-of-materials document from the results. CycloneDX is a lightweight BOM specification that is easily created, human readable, and simple to parse.' implementationClass = 'org.cyclonedx.gradle.CycloneDxPlugin' diff --git a/pom.xml b/pom.xml index 55d8bd4..21b9466 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 4.0.0 - org.cyclonedx + com.cyclonedx cyclonedx-gradle-plugin jar 1.2.0 diff --git a/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java b/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java index f1664aa..f3d6fc7 100644 --- a/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java +++ b/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java @@ -258,6 +258,7 @@ private Component.Type resolveProjectType() { private Component convertArtifact(ResolvedArtifact artifact) { final Component component = new Component(); + getLogger().debug("convertArtifact: working on " + artifact.getModuleVersion().getId().getName()); component.setGroup(artifact.getModuleVersion().getId().getGroup()); component.setName(artifact.getModuleVersion().getId().getName()); component.setVersion(artifact.getModuleVersion().getId().getVersion()); From f43038e2d870d55c22ae58f0f1150b7a5c0c03ab Mon Sep 17 00:00:00 2001 From: Mark Jaffe Date: Thu, 3 Sep 2020 14:44:40 -0700 Subject: [PATCH 4/4] Missed a couple of updates from Springett --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0a71e21..47fd184 100644 --- a/build.gradle +++ b/build.gradle @@ -19,8 +19,8 @@ dependencies { // gradle-api already includes an slf4j binding exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' } - compile 'commons-codec:commons-codec:1.13' - compile 'commons-io:commons-io:2.6' + compile 'commons-codec:commons-codec:1.15' + compile 'commons-io:commons-io:2.7' compile 'org.apache.maven:maven-core:3.5.0' }