Skip to content

Able to work with multiple source dir #20

Description

@jershell

Current state of kotlin multiplatform not support "flavors\builttypes". But its not trouble. Just enough do more sources by conditions

        val commonMain by getting {
            if(BUILD_TYPE == BUILD_TYPE.STAGE) {
                val variantSrc = "${project.rootDir}/app/src/variantMainStage/kotlin"
                val variantResources = "${project.rootDir}/app/src/variantMainStage/libres"
                kotlin.srcDir(variantSrc)
                resources.srcDir(variantResources)
            } else {
                // default
                val variantSrc = "${project.rootDir}/app/src/variantMainDemo/kotlin"
                val variantResources = "${project.rootDir}/app/src/variantMainDemo/libres"
                kotlin.srcDir(variantSrc)
                resources.srcDir(variantResources)
            }
...
}

Its work. We have same set of dependencies that containt commonMain and look like a habitual androids flavor setup

But libres dont see an alternative resources. Do you khow how to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions