From 878c0e30b498490017429f1a93916ff615776432 Mon Sep 17 00:00:00 2001 From: cassaram09 Date: Mon, 1 Jul 2019 21:49:14 -0400 Subject: [PATCH 1/2] compatability fix for react-native v0.59 --- android/build.gradle | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 849e79a..e8df4bf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,13 +11,22 @@ buildscript { apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + +def DEFAULT_COMPILE_SDK_VERSION = 26 +def DEFAULT_BUILD_TOOLS_VERSION = "26.0.3" +def DEFAULT_MIN_SDK_VERSION = 16 +def DEFAULT_TARGET_SDK_VERSION = 22 + android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) + buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION) defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) + targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) versionCode 1 versionName "1.0" } From ccc00e17892d0db8e5b60883e86eaea54f5c9187 Mon Sep 17 00:00:00 2001 From: cyanbullets <86730474+cyanbullets@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:59:05 -0700 Subject: [PATCH 2/2] Compile was deprecated so using implementation fixes the issue for newer builds --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index e8df4bf..0eac867 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -40,6 +40,6 @@ repositories { } dependencies { - compile 'com.facebook.react:react-native:+' + implementation 'com.facebook.react:react-native:+' } \ No newline at end of file