Jerv Norsk
04/08/2022, 9:31 AMplugins {
kotlin("multiplatform")
application
}
application {
mainClass.set("io.github.jervnorsk.aden.server.Main")
}
kotlin {
jvm {
testRuns["test"].executionTask.configure {
useJUnitPlatform()
testLogging {
events = setOf(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showExceptions = true
showStandardStreams = true
}
}
}
sourceSets {
val commonMain by getting {
dependencies {}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-server-core:${extra["ktor.version"]}")
implementation("io.ktor:ktor-server-netty:${extra["ktor.version"]}")
implementation("ch.qos.logback:logback-classic:1.2.5")
}
}
}
}
Jerv Norsk
04/08/2022, 9:36 AMJerv Norsk
04/08/2022, 9:56 AM> Task :run FAILED
Error: Could not find or load main class io.github.jervnorsk.aden.server.Main
Caused by: java.lang.ClassNotFoundException: io.github.jervnorsk.aden.server.Main
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/home/jervnorsk/.sdkman/candidates/java/11.0.12-open/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 2s
1 actionable task: 1 executed
Vampire
04/08/2022, 10:02 AMmain.kt
?Vampire
04/08/2022, 10:03 AMJerv Norsk
04/08/2022, 10:16 AMmain.kt
content is:
@file:JvmName("Main")
package io.github.jervnorsk.aden.server
fun main(args: Array<String>) {
println("Hello World!")
}
Jerv Norsk
04/08/2022, 10:23 AMVampire
04/08/2022, 11:48 AMapplication
plugin and you need to connect them yourselfJerv Norsk
04/08/2022, 12:37 PMtapchicoma
04/08/2022, 1:10 PMJerv Norsk
04/08/2022, 1:11 PMVampire
04/08/2022, 1:26 PMJames Black
04/09/2022, 8:02 AMkotlin {
android()
jvm {
withJava()
}