-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
kscript/src/main/kotlin/io/github/kscripting/kscript/code/GradleTemplates.kt
Lines 69 to 78 in 6acd4e1
|tasks.jar { | |
| manifest { | |
| attributes["Main-Class"] = "$capsuleApp" | |
| } | |
| archiveBaseName.set("$baseName") | |
| configurations["compileClasspath"].forEach { file: File -> | |
| from(zipTree(file.absoluteFile)) | |
| } | |
| duplicatesStrategy = DuplicatesStrategy.INCLUDE | |
|} |
Here I see that we don't use runtimeClasspath
and in some scenarios, we need to.
I guess something like so,
from({
configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }
})
For example,
@file:DependsOn("com.linecorp.armeria:armeria:1.30.1")
import com.linecorp.armeria.client.WebClient
val wc = WebClient.of("https://ssl-checker.io/api/v1/check/")
wc
.get("/example.com")
.aggregate()
.thenAccept { response ->
println(response.contentUtf8())
}.join()
Try this script, it works when run using kscript
, however it doesn't work when compiled with --package
option.
You need to add @file:DependsOn("io.netty:netty-handler-proxy:4.1.112.Final")
to make it compile.
Metadata
Metadata
Assignees
Labels
No labels