Skip to content

Commit d6c3a4b

Browse files
author
diego
committed
fix androidX legacy dependencies...
this is a hacky way to detect when to use the legacy dependecies from androidX.
1 parent 85a7858 commit d6c3a4b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

android/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ dependencies {
4646

4747
compileOnly "com.facebook.react:react-native:+"
4848
implementation "com.google.android.libraries.places:places:1.1.0"
49-
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
50-
implementation "com.android.support:support-v4:${supportLibVersion}"
5149
implementation "com.google.code.findbugs:jsr305:3.0.2"
50+
51+
if (rootProject.findProperty("android.useAndroidX")) {
52+
implementation "androidx.appcompat:appcompat:1.0.2"
53+
implementation "androidx.legacy:legacy-support-v4:1.0.0"
54+
} else {
55+
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
56+
implementation "com.android.support:support-v4:${supportLibVersion}"
57+
}
5258
}

0 commit comments

Comments
 (0)