From aad68eb84102203fcb27a10c3de017507ed9ea1d Mon Sep 17 00:00:00 2001 From: Jochen Just Date: Wed, 17 May 2023 10:21:44 +0200 Subject: [PATCH] Provides gradle task to create release artifacts --- build.gradle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.gradle b/build.gradle index b575870..e184065 100644 --- a/build.gradle +++ b/build.gradle @@ -47,3 +47,19 @@ cyclonedxBom { includeConfigs = ["runtimeClasspath"] schemaVersion = "1.4" } + +def releaseDirectory = layout.buildDirectory.dir("release") + +tasks.register("packageBoms", Zip) { + archiveFileName.set("software-bill-of-materials.zip") + destinationDirectory.set(releaseDirectory) + from(cyclonedxBom.outputs){ + include ("bom.*") + } +} + +tasks.register("release", Copy) { + dependsOn packageBoms + from(bootJar.outputs) + into(releaseDirectory) +}