diff --git a/android/build.gradle b/android/build.gradle index 53a1a73..d815dca 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,23 +1,25 @@ apply plugin: "com.android.library" +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 25 - buildToolsVersion "25.0.1" + compileSdkVersion safeExtGet('compileSdkVersion', 25) + buildToolsVersion safeExtGet('buildToolsVersion', "25.0.1") defaultConfig { - minSdkVersion 16 - targetSdkVersion 23 - versionCode 1 - versionName "1.0" + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 27) } } dependencies { - compile "com.facebook.react:react-native:+" // From node_modules - compile 'com.android.support:customtabs:25.0.1' - compile ('com.github.droibit.customtabslauncher:launcher:1.0.8') { + implementation "com.facebook.react:react-native:+" // From node_modules + implementation "com.android.support:customtabs:${safeExtGet('supportLibVersion', '25.0.1')}" + implementation ('com.github.droibit.customtabslauncher:launcher:1.0.8') { exclude module: 'customtabs' } - testCompile 'junit:junit:4.12' -} \ No newline at end of file + testImplementation 'junit:junit:4.12' +}