Skip to content

Commit

Permalink
Provides gradle task to create release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
quandor committed May 17, 2023
1 parent 9e85be3 commit aad68eb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit aad68eb

Please sign in to comment.