From 85bb8d46c0a616d19747e3543fec30c3dd296596 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Sat, 5 Nov 2022 15:28:41 +0000 Subject: [PATCH] Add exclusiveContent on template for 0.68 --- template/android/build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/template/android/build.gradle b/template/android/build.gradle index 5dfc68a632ee6a..4ce42dda5c22f6 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -32,6 +32,20 @@ buildscript { allprojects { repositories { + exclusiveContent { + // We get React Native's Android binaries exclusively through npm, + // from a local Maven repo inside node_modules/react-native/. + // (The use of exclusiveContent prevents looking elsewhere like Maven Central + // and potentially getting a wrong version.) + filter { + includeGroup "com.facebook.react" + } + forRepository { + maven { + url "$rootDir/../node_modules/react-native/android" + } + } + } maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android")