https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

mbonnin

05/13/2020, 2:31 PM
Is there a way to publish an Android library variant "merged", without specifying a
BuildType
attribute ? Something like only publish the
release
variant and only expose that to consumers ? Right now, when a user declares a custom
BuildType
in
app/build.gradle.kts
, variant matching doesn't find the android lib and fallbacks to the JVM
s

Sam Dozor

05/13/2020, 2:50 PM
Copy code
kotlin {
    android() {
        publishLibraryVariants("release")
    }
}
m

mbonnin

05/13/2020, 2:50 PM
That still publishes the
BuildType = release
attribute
s

Sam Dozor

05/13/2020, 2:50 PM
ah, sorry misunderstood.
m

mbonnin

05/13/2020, 2:51 PM
Ideally, I'd like a way to remove that from the module files
No pb
s

shikasd

05/13/2020, 9:33 PM
Usually you publish release only and specify matching fallbacks for you custom variants in consumers.
t

taso

05/13/2020, 10:13 PM
@shikasd so you mean all consumers of the library will have to declare matching fallbacks?
s

shikasd

05/13/2020, 10:20 PM
iirc, yes
s

Sam Dozor

05/13/2020, 10:21 PM
That sucks for consumers.
m

mbonnin

05/15/2020, 6:36 PM
Issue filed there, upvotes welcome :-) https://youtrack.jetbrains.com/issue/KT-38954
👍 1
4 Views