From 5d0e0e50d663b4de43d0424659459ac62b6de9a5 Mon Sep 17 00:00:00 2001 From: DenSakh Date: Fri, 22 Jul 2022 16:56:02 +0300 Subject: [PATCH] Fix maven --- android/build.gradle | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3fe120f..031eadf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -38,7 +38,6 @@ buildscript { if (project == rootProject) { repositories { google() - mavenCentral() jcenter() mavenCentral() } @@ -66,18 +65,22 @@ android { } repositories { - // ref: https://www.baeldung.com/maven-local-repository - mavenCentral() - maven { + maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../node_modules/react-native/android" + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } } google() - jcenter() - maven { - // Android JSC is installed from npm - url "$rootDir/../node_modules/jsc-android/dist" - } } dependencies {