From d6c3a4b65eb71cf81fb66ebbe8cdfebc4870bb46 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 18 Jul 2019 15:16:11 -0300 Subject: [PATCH] fix androidX legacy dependencies... this is a hacky way to detect when to use the legacy dependecies from androidX. --- android/build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8e2c769..992c1df 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -46,7 +46,13 @@ dependencies { compileOnly "com.facebook.react:react-native:+" implementation "com.google.android.libraries.places:places:1.1.0" - implementation "com.android.support:appcompat-v7:${supportLibVersion}" - implementation "com.android.support:support-v4:${supportLibVersion}" implementation "com.google.code.findbugs:jsr305:3.0.2" + + if (rootProject.findProperty("android.useAndroidX")) { + implementation "androidx.appcompat:appcompat:1.0.2" + implementation "androidx.legacy:legacy-support-v4:1.0.0" + } else { + implementation "com.android.support:appcompat-v7:${supportLibVersion}" + implementation "com.android.support:support-v4:${supportLibVersion}" + } } \ No newline at end of file