Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger 2.31.1 depends on RC versions of AndroidX modules #2300

Closed
francescocervone opened this issue Jan 20, 2021 · 6 comments
Closed

Dagger 2.31.1 depends on RC versions of AndroidX modules #2300

francescocervone opened this issue Jan 20, 2021 · 6 comments

Comments

@francescocervone
Copy link

I don't know if this is intentional, but I believe that majority of client projects prefer to depend on stable releases.

Diff

@shekibobo
Copy link

This has been throwing me off all morning. Our fragment animations apparently don't exist in fragment:1.3.0-alphaX.

@danysantiago
Copy link
Member

This is intentional, the plan is to declare these dependencies on the stable androidx versions before Hilt is moved to beta and stable. Note that these androidx RC releases are API locked, meaning whichever APIs are no longer available will also not be available in the stable release. See https://developer.android.com/jetpack/androidx/versions for clarification of androidx versions.

@francescocervone
Copy link
Author

francescocervone commented Jan 20, 2021

Thanks @danysantiago. This does make sense if you talk about Hilt which an alpha dependency, but I'm pretty sure also projects depending on dagger-android are affected by this change. Am I wrong?

@danysantiago
Copy link
Member

Ah, Yes, dagger-android is also affected here and that was not intended. We are looking into resolving this issue.

@sczerwinski
Copy link

sczerwinski commented Jan 21, 2021

The biggest problem these RC versions of dependencies cause is:

* What went wrong:
   > Could not resolve androidx.activity:activity:1.2.0-rc01.
     Required by:
         project :hilt:processor > com.google.dagger:hilt-android:2.31.1-alpha
      > No matching variant of androidx.activity:activity:1.2.0-rc01 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'releaseApiPublication' capability androidx.activity:activity:1.2.0-rc01 declares an API of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
          - Variant 'releaseRuntimePublication' capability androidx.activity:activity:1.2.0-rc01 declares a runtime of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
          - Variant 'sourcesElements' capability androidx.activity:activity:1.2.0-rc01 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
   > Could not resolve androidx.fragment:fragment:1.3.0-rc01.
     Required by:
         project :hilt:processor > com.google.dagger:hilt-android:2.31.1-alpha
      > No matching variant of androidx.fragment:fragment:1.3.0-rc01 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'releaseApiPublication' capability androidx.fragment:fragment:1.3.0-rc01 declares an API of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
   > Could not resolve androidx.savedstate:savedstate:1.1.0-rc01.
     Required by:
         project :hilt:processor > com.google.dagger:hilt-android:2.31.1-alpha
      > No matching variant of androidx.savedstate:savedstate:1.1.0-rc01 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'releaseApiPublication' capability androidx.savedstate:savedstate:1.1.0-rc01 declares an API of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
          - Variant 'releaseRuntimePublication' capability androidx.savedstate:savedstate:1.1.0-rc01 declares a runtime of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
          - Variant 'sourcesElements' capability androidx.savedstate:savedstate:1.1.0-rc01 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')

EDIT: My bad, I used AAR dependency in a JVM module (annotation processor). However, it somehow worked with Hilt 2.31-alpha. 🤷🏻

@Chang-Eric
Copy link
Member

Sorry for the problems here, this change wasn't supposed to make it into the minor release between 2.31 and 2.31.1. This has been reverted and that has been released in 2.31.2 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants