forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Migrate away from removed AGP APIs #2618
Labels
Comments
copybara-service bot
pushed a commit
that referenced
this issue
May 14, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
copybara-service bot
pushed a commit
that referenced
this issue
May 14, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
copybara-service bot
pushed a commit
that referenced
this issue
May 14, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
copybara-service bot
pushed a commit
that referenced
this issue
May 14, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
copybara-service bot
pushed a commit
that referenced
this issue
May 14, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
copybara-service bot
pushed a commit
that referenced
this issue
May 17, 2021
The AndroidComponentsExtension's methods androidTests() and unitTests() are removed from AGP 7.0, migrate away from their usages by using the new variant.androidTest and variant.unitTest methods. To support backward compatibility for users with AGP 4.2 reflect into the old and removed methods. Furthermore to protect against unstable API changes this change adds a postsubmit Github Action to compile the Hilt Gradle plugin against the latest released Android Gradle Plugin. This combined with turning ON all warnings as error will help such that if an API is marked as @deprecated, then the build will fail. Due to all warnings as error being ON a few additional suppressed are added, all previous ones are commented and some trivial API usages from AGP were removed. In essence only APIs from the 'com.android.build.api' package are safe to use. Fixes: #2618 RELNOTES=Fix compatibility issue with the Hilt Gradle Plugin and Android Gradle Plugin 7.0 PiperOrigin-RevId: 373728621
This was referenced May 19, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HiltGradlePlugin uses apis that have been removed in Android Gradle Plugin 7.0.0-*
Specifically,
androidComponents.androidTests
Right now with tip of tree AGP (and thus next release), Gradle crashes with:
The text was updated successfully, but these errors were encountered: