Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions dropwizard/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,19 @@ tasks.register<Jar>("testJar") {
val shadowJar =
tasks.named<ShadowJar>("shadowJar") {
append("META-INF/hk2-locator/default")
finalizedBy("startScripts")
finalizedBy("startShadowScripts")
}

val startScripts =
tasks.named<CreateStartScripts>("startScripts") {
classpath = files(provider { shadowJar.get().archiveFileName })
applicationName = "polaris-service"
}
tasks.named<CreateStartScripts>("startScripts") { applicationName = "polaris-service" }

tasks.named<CreateStartScripts>("startShadowScripts") { applicationName = "polaris-service" }

tasks.register<Sync>("prepareDockerDist") {
into(project.layout.buildDirectory.dir("docker-dist"))
from(startScripts) { into("bin") }
from(shadowJar) { into("lib") }
doFirst { delete(project.layout.buildDirectory.dir("regtest-dist")) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why this doFirst section was introduced. I do not see any "regtest-dist" directory in the codebase.

from(configurations.runtimeClasspath) { into("lib") }
from(tasks.named<Jar>("jar")) { into("lib") }
}

tasks.named("build").configure { dependsOn("prepareDockerDist") }
Expand All @@ -193,6 +192,12 @@ distributions {
from("../../LICENSE-BINARY-DIST").rename("LICENSE-BINARY-DIST", "LICENSE")
}
}
named("shadow") {
contents {
from("../../NOTICE")
from("../../LICENSE-BINARY-DIST").rename("LICENSE-BINARY-DIST", "LICENSE")
}
}
}

tasks.named("assemble").configure { dependsOn("testJar") }
Loading