Fernando Sanchez (Perraco Labs)
03/13/2024, 9:36 AMapplication {
mainClass.set("$group.ApplicationKt")
}
But for the child sub-projects, I had to set the main class to empty:
application {
mainClass.set("")
}
If I don't do this, I encounter an exception when running the buildFatJar task:
Execution failed for task ':kcrud-employment:shadowJar'.
Error while evaluating property 'mainClassName' of task ':kcrud-employment:shadowJar'.
Cannot query the value of extension 'application' property 'mainClass' because it has no value available.
Is it expected behavior to explicitly set the mainClass to empty for sub-projects? I assumed this would be implicitly detected by the Gradle task.Dominik Sandjaja
03/13/2024, 10:39 AMFernando Sanchez (Perraco Labs)
03/13/2024, 1:31 PMplugins {
application
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.ktor)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.graphql.expedia)
}
And the sub-projects I had:
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.ktor)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.graphql.expedia)
}
Removing alias(libs.plugins.ktor)
in the sub-projects solves the issue. I'm a bit confused about why.