PranavMaganti / compose-material-dialogs

A Material Dialog Builder for Jetpack Compose
Other
594 stars 78 forks source link

No matching variant of io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc was found #161

Closed nuhkoca closed 1 year ago

nuhkoca commented 2 years ago

Describe the bug Gradle will crash while creating a new build after the library is implemented

To Reproduce Steps to reproduce the behaviour (including any applicable code):

  1. Set AGP to 7.4.0-alpha09
  2. Implement io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc
  3. Create rc build variant
  4. Execute ./gradlew assembleRc

Expected behaviour Gradle will create a new build

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:extractIncludeRcProto'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':app:rcCompileClasspath'.
      > Could not resolve io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc.
        Required by:
            project :app
         > No matching variant of io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'rc', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.4.0-alpha09', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
             - Variant 'debugVariantMavenApiPublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares an API of a component:
                 - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'debugVariantMavenJavaDocPublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'debugVariantMavenRuntimePublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'debugVariantMavenSourcePublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'releaseVariantMavenApiPublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares an API of a component:
                 - 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 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'releaseVariantMavenJavaDocPublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - 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 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'releaseVariantMavenRuntimePublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - 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 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'releaseVariantMavenSourcePublication' capability io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc declares a runtime of a component:
                 - 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 'rc'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '7.4.0-alpha09')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
KeisukeYamashita commented 2 years ago

@vanpra Hello, I'm having a same issue on build type other than debug. I'm using the Android compose 1.1.0 and I tried the 0.7.2 and 0.8.1-rc of this module's release but had the same error as described above. I'm using the 6.2.0 of Android Gradle pulgin.

I looks like this module only works with debug build type. I'm my local env, it worked with dev and prod. If there are workarounds, please let me know.

Thank you for this super nice work.

morganesoula commented 2 years ago

Issue is still open. Did anyone find a workaround or something?

nuhkoca commented 1 year ago

Fixed in 0.9.0 for me