material-components / material-components-android-compose-theme-adapter

A library that enables reuse of Material themes defined in XML for theming in Jetpack Compose.
https://material-components.github.io/material-components-android-compose-theme-adapter/
Apache License 2.0
415 stars 40 forks source link

Version 1.1.22 ships with missing dependency on :core module #101

Closed mannodermaus closed 1 year ago

mannodermaus commented 1 year ago

Thanks for providing this library! After updating compose-theme-adapter to 1.1.22, my build started to fail with the following error:

Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find material-components-android-compose-theme-adapter:core:unspecified.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/material-components-android-compose-theme-adapter/core/unspecified/core-unspecified.pom
       - https://repo.maven.apache.org/maven2/material-components-android-compose-theme-adapter/core/unspecified/core-unspecified.pom
       - https://zendesk.jfrog.io/zendesk/repo/material-components-android-compose-theme-adapter/core/unspecified/core-unspecified.pom
       - https://jitpack.io/material-components-android-compose-theme-adapter/core/unspecified/core-unspecified.pom
     Required by:
         project :app > project :ui-compose > com.google.android.material:compose-theme-adapter:1.1.22

While inspecting the POM of this artifact (DL link from maven.google.com), I noticed a dependency on the newly refactored :core module, but without proper group/artifact IDs. We'd need to ship that core as its own Maven artifact, or at the very least include its code into the two artifacts that are shipped. I have reverted to 1.1.21 for the time being.

<!-- Just an excerpt, the actual file is longer -->
  <dependencies>
    <dependency>
      <groupId>material-components-android-compose-theme-adapter</groupId>
      <artifactId>core</artifactId>
      <version>unspecified</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>lifecycle-viewmodel-ktx</artifactId>
          <groupId>androidx.lifecycle</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
ricknout commented 1 year ago

This should now be fixed in the latest releases:

mannodermaus commented 1 year ago

Confirmed working with the latest version. Thank you for the quick turnaround! šŸ™‡ā€ā™‚ļø