Open MateuszKrawczuk opened 3 years ago
@MateuszKrawczuk thanks for reporting. Could it be solved by providing a fallback value like mentioned in the docs?
https://kotlinlang.org/docs/reference/mpp-publish-lib.html#publish-an-android-library
android {
buildTypes {
val staging by creating {
// ...
matchingFallbacks = listOf("release", "debug")
}
}
}
It may fix the issue, but I didn't have time to rebuild this library and test this solution.
Gave it a try (was having the same issue) and adding
buildTypes {
...
debug {
...
matchingFallbacks = ['release']
...
}
}
To all the modules of my android App seemed to fix the problem.
Any chance you could fix the library packaging ? (If it is the actual problem :) )
I am not sure if this is something I should fix on the library level or if it is better for the consumers to have total control over the fallback. Any suggestions are welcome.
Maybe but quick question (far for a KMP build expert): Shouldn't a debug build be packaged also ?
Sounds good, I ll start publishing the debug builds from the next version onwards.
@marclefrancois currently, I am publishing the android debug builds as well which you can add like following:
implementation 'suparnatural-kotlin-multiplatform:fs-android-debug:1.0.12'
Is this enough to solve the use case?
Describe the bug After upgrading to 1.0.12 library has an issue with handling different flavors of application. I have to prepare different builds for Development and Release, but it is not possible due to error when resolving dependencies. Downgrading to 1.0.10 solves the problem, but the project is migrating to Kotlin 1.4 and the newer version of the library build with the up-to-date release of Kotlin is highly recommended.
To Reproduce Steps to reproduce the behavior: Create an android app and library using Flavour dimensions in build.gradle.kts
Expected behavior Application builds without issue with solving dependencies.
Stacktrace Gradle output:
Version 1.0.12
Platforms affected:
Additional context Add any other context about the problem here.