Thread
#multiplatform
    mbonnin

    mbonnin

    2 years ago
    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

    2 years ago
    kotlin {
        android() {
            publishLibraryVariants("release")
        }
    }
    mbonnin

    mbonnin

    2 years ago
    That still publishes the
    BuildType = release
    attribute
    s

    Sam Dozor

    2 years ago
    ah, sorry misunderstood.
    mbonnin

    mbonnin

    2 years ago
    Ideally, I'd like a way to remove that from the module files
    No pb
    shikasd

    shikasd

    2 years ago
    Usually you publish release only and specify matching fallbacks for you custom variants in consumers.
    t

    taso

    2 years ago
    @shikasd so you mean all consumers of the library will have to declare matching fallbacks?
    shikasd

    shikasd

    2 years ago
    iirc, yes
    s

    Sam Dozor

    2 years ago
    That sucks for consumers.
    mbonnin

    mbonnin

    2 years ago
    Issue filed there, upvotes welcome 😃 https://youtrack.jetbrains.com/issue/KT-38954