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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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