Mars
06/01/2020, 2:14 PMkotlin {
jvm()
}
would create jvmMain
source set?
I then declare dependencies for the source set in the following way
jvm().compilations["main"].defaultSourceSet {
dependsOn(commonMain)
dependencies {
...
}
}
but I can't make this very simple project run. I'm getting
SourceSet with name 'jvmMain' not found.
For details, please check:
https://stackoverflow.com/questions/62132959/sourceset-with-name-jvmmain-not-foundchristophsturm
06/01/2020, 2:19 PMchristophsturm
06/01/2020, 2:22 PMMars
06/01/2020, 2:23 PMjvmMain
.christophsturm
06/01/2020, 2:25 PM./gradlew build
?Mars
06/01/2020, 2:27 PM* What went wrong:
Execution failed for task ':compileKotlinJvm'.
> kotlin/coroutines/Continuation
Not sure that's related though, happens every once in a while. I think deleting gradle cache helps.
Let me try to fix this and run build
.christophsturm
06/01/2020, 2:27 PMjvm()
to
jvm {
withJava()
}
Mars
06/01/2020, 2:28 PMchristophsturm
06/01/2020, 2:29 PMapplication
pluginMars
06/01/2020, 3:05 PMwithJava()
didn't seem to help. build
is successful but running the Java class still results in
SourceSet with name 'jvmMain' not found.
When I add application
plugin, build fails with
A problem was found with the configuration of task ':startScripts'.
> No value has been specified for property 'mainClassName'.
I tried to add the property like
application {
mainClass.set("Home")
}
or add to gradle.properties
but it didn't do the trick.Mars
06/01/2020, 3:07 PMmainClassName
for application
plugin
jvm().compilations["main"].defaultSourceSet {
configure<JavaApplication> {
mainClassName = "Home"
}
It builds successfully now but run
fails with
> Process 'command '/Java/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 134
Makes me think that the problem could be in the run configuration.. do you think this looks okay?christophsturm
06/01/2020, 4:57 PM