Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

improved SDK values -use SDK Version values from root project #5

Merged
merged 2 commits into from
Sep 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion safeExtGet('compileSdkVersion', 26)
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')

defaultConfig {
minSdkVersion 16
targetSdkVersion 23
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 26)
versionCode 1
versionName "1.0"
}

lintOptions {
Expand All @@ -15,5 +21,5 @@ android {
}

dependencies {
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}" // From node_modules
}