masc3d
09/07/2017, 4:19 PMgradle-4.1
) sourceSets.main.output.classesDir = new File(buildDir, “classes/main”)
sourceSets.main.kotlin.outputDir = new File(buildDir, “classes/main”)
h0tk3y
09/07/2017, 4:46 PMsourceSets.main.output.classesDir
) is considered deprecated since Gradle 4.0, the builds should support separate classes directories for the JVM languages (the file collection is sourceSets.main.output.classesDirs
).
As to the destination directory that Kotlin uses, you can set it with compileKotlin.destinationDir = ...
.
Though the fact that sourceSets.main.kotlin.outputDir = ...
doesn't work seems to be a bug, I'll check it.masc3d
09/07/2017, 4:57 PMclassesDirs
is immutable afaik, Ih0tk3y
09/07/2017, 5:00 PMkotlin.copyClassesToJavaOutput = true
to your build script (https://youtrack.jetbrains.com/issue/KT-19774), this will make sourceSets.main.output.classesDir = new File(buildDir, "classes/main")
work.masc3d
09/07/2017, 5:43 PMgradle-4.2
, kotlin.copyClassesToJavaOutput
will not work when the project doesn’t contain java classes at all.