libres icon indicating copy to clipboard operation
libres copied to clipboard

Able to work with multiple source dir

Open jershell opened this issue 1 year ago • 6 comments

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?

jershell avatar Jun 16 '23 09:06 jershell