From 06e31c748fe87a866dbaf4d0c2019e76ec00e309 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Wed, 18 Aug 2021 08:50:45 -0700 Subject: [PATCH] fix AGP 7 compatibility (#32030) 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: https://github.com/facebook/react-native/pull/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 --- template/android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/android/app/build.gradle b/template/android/app/build.gradle index 8dc22f4e870..4e64e6a0d08 100644 --- a/template/android/app/build.gradle +++ b/template/android/app/build.gradle @@ -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' }