Skip to content

Commit

Permalink
Simplifies release task
Browse files Browse the repository at this point in the history
Only one task needs to know about the target directory 'build/release'
  • Loading branch information
quandor committed May 17, 2023
1 parent aad68eb commit 590a067
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ cyclonedxBom {
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.*")
}
Expand All @@ -61,5 +58,6 @@ tasks.register("packageBoms", Zip) {
tasks.register("release", Copy) {
dependsOn packageBoms
from(bootJar.outputs)
into(releaseDirectory)
from(packageBoms.outputs)
into(layout.buildDirectory.dir("release"))
}

0 comments on commit 590a067

Please sign in to comment.