Hey this is as much a gradle question as a kotlin ...
# android
m
Hey this is as much a gradle question as a kotlin question, and kotlin multiplatform. Sorry if it's been asked before. With Gradle 6.+ there's the new module metadata format published for projects. I can use a kotlin multiplatform project as a dependency without issues in Gradle before 6 but when I upgrade, the commands like assemble and build spit out errors suggesting I'm missing a published debug variant
Copy code
What went wrong:

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.

   > Could not resolve com.realeyes.videoadvertising:videoadvertising-android:0.2.300.

     Required by:

         project :app

      > No matching variant of com.realeyes.videoadvertising:videoadvertising-android:0.2.300 was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.gradle.internal.dependency.AndroidTypeAttr' with value 'Aar', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:

          - Variant 'android-releaseApiElements' capability com.realeyes.videoadvertising:videoadvertising-android:0.2.300 declares an API of a component, as well as attribute 'com.android.build.gradle.internal.dependency.AndroidTypeAttr' with value 'Aar', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':

              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
But I must be missing something cause I declare the android build to have 'debug' and 'release' published
Copy code
kotlin {
    android {
        publishLibraryVariants("release", "debug")
    }
Is there an extra step to make the module metadata publish debug variants for a kotlin multi-platform project?