hi, I've got this in my shared library Gradle conf...
# multiplatform
t
hi, I've got this in my shared library Gradle config:
Copy code
android {
    // 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!
e
that overlaps with the new sourceset layout configured by KMP, https://kotlinlang.org/docs/multiplatform-android-layout.html