From e433bbf33ee5d4ea7681d1831d7eb3e84c9437ee Mon Sep 17 00:00:00 2001 From: mike castleman Date: Sun, 22 Apr 2018 14:43:58 -0400 Subject: [PATCH 1/3] allow root project to specify dependency versions --- android/build.gradle | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 846e5474..6a1f6e47 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,3 @@ -project.ext { - buildToolsVersion = "23.0.1" -} - buildscript { repositories { jcenter() @@ -14,13 +10,18 @@ buildscript { apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 23 +def DEFAULT_BUILD_TOOLS_VERSION = "23.0.1" +def DEFAULT_TARGET_SDK_VERSION = 22 +def DEFAULT_SUPPORT_LIB_VERSION = "23.0.1" + android { - compileSdkVersion 23 - buildToolsVersion "${project.ext.buildToolsVersion}" + compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" } @@ -33,8 +34,10 @@ repositories { mavenCentral() } +def supportVersion = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION + dependencies { compile 'com.facebook.react:react-native:+' - compile "com.android.support:customtabs:${project.ext.buildToolsVersion}" + compile "com.android.support:customtabs:${supportVersion}" } From 343639a875982f030e9cf55ae3591b5be8cb8f23 Mon Sep 17 00:00:00 2001 From: mike castleman Date: Tue, 24 Apr 2018 21:01:26 -0400 Subject: [PATCH 2/3] add note in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d91b52e1..c5b07754 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ android:windowSoftInputMode="adjustResize"> ``` +In order to reduce the potential for conflict which may be caused by the presence of differing versions of the Android support libraries, you may wish to [configure project-wide properties](https://developer.android.com/studio/build/gradle-tips.html#configure-project-wide-properties) setting the compile SDK version, build tools version, target SDK, and support library, in your root project's `build.gradle`, which will then be respected by `react-native-auth0` and many other React Native modules. + > For more info please read [react native docs](https://facebook.github.io/react-native/docs/linking.html) #### iOS From 2cfc81aedd525b7eb0aacac050c8fe215a6b616e Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Wed, 25 Apr 2018 14:55:38 -0300 Subject: [PATCH 3/3] reorder and reword --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5b07754..6ae0a9bf 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,11 @@ android:windowSoftInputMode="adjustResize"> ``` -In order to reduce the potential for conflict which may be caused by the presence of differing versions of the Android support libraries, you may wish to [configure project-wide properties](https://developer.android.com/studio/build/gradle-tips.html#configure-project-wide-properties) setting the compile SDK version, build tools version, target SDK, and support library, in your root project's `build.gradle`, which will then be respected by `react-native-auth0` and many other React Native modules. - > For more info please read [react native docs](https://facebook.github.io/react-native/docs/linking.html) + +In order to reduce the potential for conflict which may be caused by the presence of differing versions of the Android support libraries, you may wish to [configure project-wide properties](https://developer.android.com/studio/build/gradle-tips.html#configure-project-wide-properties). Setting the Compile and Target SDK versions, Build Tools version, and Support Library version in your **root project's** `build.gradle` file will make `react-native-auth0` and many other React Native modules use them. + #### iOS Inside the `ios` folder find the file `AppDelegate.[swift|m]` add the following to it