so far I have ``` jar { archiveName = "onboard...
# gradle
n
so far I have
Copy code
jar {
    archiveName = "onboarding.jar"

    manifest {
        attributes(
            "Class-Path" to ???
            "Main-Class" to "com.mything.MainKt"
        )
    }
}
but
configurations.compile.collect...
isn’t a thing in the Kotlin DSL
e
The Kotlin equivalent of the Groovy
.collect {}
is
.map {}
.
this should do:
Copy code
configurations.compile.get().map { it.name }.joinToString(" ")
can also be simplified to:
Copy code
configurations.compile.get().joinToString(" ") { it.name }
n
Excellent! The latter example works perfect. Thank you a ton! 😄
e
You’re welcome
You probably don’t want to resolve the
compile
configuration though.
The
runtimeClasspath
configuration sounds like a better fit for your use case
n
What is the difference between the two?
e
compile
is a bucket where you declare compile time dependencies
runtimeClasspath
represent the resolveable runtime classpath see https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations