try alpha cyclonedx plugin version (minor tweaks)
diff --git a/build.gradle b/build.gradle
index 58f6d76..cc6e0f5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+import org.cyclonedx.model.ExternalReference
+import org.cyclonedx.model.License
+import org.cyclonedx.model.LicenseChoice
+import org.cyclonedx.model.OrganizationalContact
+import org.cyclonedx.model.OrganizationalEntity
plugins {
id 'com.github.ben-manes.versions' version '0.52.0'
@@ -279,7 +284,16 @@
loggingRuntimeElements file: jar.archiveFile.get().asFile, type: 'jar'
}
-// this really belongs in org.apache.groovy-published-library.gradle but currently gives errors
+// below here really belongs in org.apache.groovy-published-library.gradle but currently gives errors
+def oe = new OrganizationalEntity(name: 'Apache Software Foundation',
+ urls: ['https://www.apache.org/', 'https://security.apache.org/'])
+oe.addContact(new OrganizationalContact(name: 'Apache Groovy Development Team',
+ email: 'dev@groovy.apache.org'))
+def lc = new LicenseChoice()
+lc.addLicense(new License(name: 'Apache-2.0',
+ url: 'https://www.apache.org/licenses/LICENSE-2.0.txt'))
+def er = new ExternalReference(url: 'https://groovy.apache.org/', type: ExternalReference.Type.WEBSITE)
+
allprojects { p ->
tasks.cyclonedxDirectBom {
includeConfigs = ['runtimeClasspath']
@@ -288,6 +302,10 @@
includeLicenseText = false
includeMetadataResolution = false
+ organizationalEntity = oe
+ licenseChoice = lc
+ externalReferences = [er]
+
xmlOutput.unsetConvention()
jsonOutput.set(file("build/reports/cyclonedx/${p.name}.json"))
}