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.38 breaks build with AGP 7.0.0-beta05 #2762

Closed
julioromano opened this issue Jul 20, 2021 · 7 comments
Closed

Dagger 2.38 breaks build with AGP 7.0.0-beta05 #2762

julioromano opened this issue Jul 20, 2021 · 7 comments

Comments

@julioromano
Copy link

julioromano commented Jul 20, 2021

Unable to find method 'com.android.build.api.variant.ApplicationVariant.getAndroidTest()Lcom/android/build/api/variant/AndroidTest;'
com.android.build.api.variant.ApplicationVariant.getAndroidTest()Lcom/android/build/api/variant/AndroidTest;

Downgrading to AGP 7.0.0-beta04 solves the issue.

Dagger's 2.38 release notes do say that any version older than AGP 7.0.0-beta04 would break, but beta05 is newer.

@wezley98
Copy link

@julioromano Did you mean beta05? Seeing this issue in 7.0.0-beta05

Unable to find method ''com.android.build.api.variant.AndroidTest com.android.build.api.variant.ApplicationVariant.getAndroidTest()'' 'com.android.build.api.variant.AndroidTest com.android.build.api.variant.ApplicationVariant.getAndroidTest()'

@julioromano julioromano changed the title Dagger 2.38 breaks build with AGP 7.0.0-alpha05 Dagger 2.38 breaks build with AGP 7.0.0-beta05 Jul 20, 2021
@julioromano
Copy link
Author

Oh yes, edited accordingly. Brainfart on my side.

@michaelnimbs
Copy link

Same error with 7.0.0-rc01

@iamarjun
Copy link

+1

copybara-service bot pushed a commit that referenced this issue Jul 27, 2021
Reflect into the property getter since the return type is different between earlier betas and RC but we are only interested that they return a com.android.build.api.variant.Component implementation.

This change also adds a few deprecation suppressions to old variant APIs and old transform APIs usages, these are deprecated but we keep using them for backwards compatibility reasons.

Fixes #2762

RELNOTES=Fix an incompatibility issue with AGP 7.0.0-beta05 and 7.0.0-rc01
PiperOrigin-RevId: 386974233
copybara-service bot pushed a commit that referenced this issue Jul 27, 2021
Reflect into the property getter since the return type is different between earlier betas and RC but we are only interested that they return a com.android.build.api.variant.Component implementation.

This change also adds a few deprecation suppressions to old variant APIs and old transform APIs usages, these are deprecated but we keep using them for backwards compatibility reasons.

Fixes #2762

RELNOTES=Fix an incompatibility issue with AGP 7.0.0-beta05 and 7.0.0-rc01
PiperOrigin-RevId: 386974233
@danysantiago
Copy link
Member

danysantiago commented Jul 27, 2021

A 2.38.1 release will be done soon that contains this fix along with the fix for #2784.

@VincentJoshuaET
Copy link

Is this applicable to 7.0.0?

@jakoss
Copy link

jakoss commented Jul 29, 2021

@VincentJoshuaET Yes

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

Successfully merging a pull request may close this issue.

7 participants