mrapplexz
04/21/2019, 4:25 PMtasks {
val processSources by creating(Sync::class) {
from(kotlin.sourceSets["main"].kotlin)
into("$buildDir/processed")
filter<ReplaceTokens>("tokens" to mapOf("VERSION" to project.version))
}
"compileKotlin"(KotlinCompile::class) {
dependsOn(processSources)
setSource(processSources.destinationDir)
}
}
but got a bunch of redeclaration errors (it looks like the Kotlin Gradle plugin also takes original source directory from somewhere else): e: /home/me/projects/test/shared/build/processed/com/company/test/shared/Responses.kt: (15, 7): Redeclaration: ResponseUser
e: /home/me/projects/test/shared/src/com/company/test/shared/Responses.kt: (15, 7): Redeclaration: ResponseUser