Skip to content

Commit

Permalink
Bruk forklarende variabel
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerga committed Oct 3, 2023
1 parent 1c85a48 commit a4ba3f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ subprojects {
archiveBaseName.set("app")

val mainClass = project.mainClass()
val dependencies = configurations.runtimeClasspath.get()

doLast {
if (project.name != "dokument") {
Expand All @@ -84,11 +85,11 @@ subprojects {

manifest {
attributes["Main-Class"] = mainClass
attributes["Class-Path"] = configurations.runtimeClasspath.get().joinToString(separator = " ") { it.name }
attributes["Class-Path"] = dependencies.joinToString(separator = " ") { it.name }
}

doLast {
configurations.runtimeClasspath.get().forEach { file ->
dependencies.forEach { file ->
File("$buildDir/libs/${file.name}")
.takeUnless(File::exists)
?.let(file::copyTo)
Expand Down

0 comments on commit a4ba3f2

Please sign in to comment.