Travis Reitter
02/03/2024, 7:29 PMandroid {
// By default the android gradle plugin expects to find the kotlin source files in
// the folder `main` and the test in the folder `test`. This is to be able place
// the source code files inside androidMain and androidTest folders
sourceSets {
getByName("main") {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
java.srcDir("src/androidMain/kotlin")
res.srcDir("src/androidMain/res")
}
getByName("test") {
java.srcDir("src/androidTest/kotlin")
res.srcDir("src/androidTest/res")
}
}
}
but it results in a "duplicate path" warning every time I Gradle sync. This solution seems to be close to what I need but it uses dependsOn
which is only defined for KotlinSourceSets
(eg, within the kotlin { }
block) not AndroidSourceSets
and I can't quite figure out the right way to do this. Any help would be greatly appreciated!ephemient
02/04/2024, 3:23 AM