Skip to content

Commit

Permalink
fix AGP 7 compatibility (#32030)
Browse files Browse the repository at this point in the history
Summary:
Android Gradle Plugin 7 removed dependency configurations, and it includes compile. Below is a snipped from release notes https://developer.android.com/studio/releases/gradle-plugin

I can confirm that RN 0.65.0 app is running as expected on Android with the patch.

> **compile**
Depending on use case, this has been replaced by api or implementation.
Also applies to *Compile variants, for example: debugCompile.

## Changelog

[Android] [Changed] - Android Gradle Plugin 7 compatibility

Pull Request resolved: #32030

Test Plan: Create a project with RN 0.65.0 and upgrade Android Gradle Plugin to 7.0.0, and Gradle to 7.0.2. It'll fail to sync. Then apply the change, and it'll sync as normal, and build the app.

Reviewed By: passy, ShikaSD

Differential Revision: D30394238

Pulled By: cortinico

fbshipit-source-id: cabc25754b9cd176a7d6c119d009728f2e5a93d9
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Aug 18, 2021
1 parent 5923ee5 commit 06e31c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ dependencies {
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand Down

1 comment on commit 06e31c7

@mikehardy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I forgot about this one! I'd just been deleting that stanza with v7 gradle testing since it was buck-related and I don't use buck
Nice one @dulmandakh !

Please sign in to comment.