This repository has been archived by the owner on Oct 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build.gradle to allow rootProject overrides of versions
- Loading branch information
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
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', 23) | ||
buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1") | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 22 | ||
minSdkVersion safeExtGet('minSdkVersion', 16) | ||
targetSdkVersion safeExtGet('targetSdkVersion', 22) | ||
versionCode 1 | ||
versionName "0.0.1" | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.facebook.react:react-native:+' | ||
compile 'com.anjlab.android.iab.v3:library:1.0.44' | ||
compile "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}" | ||
compile "com.anjlab.android.iab.v3:library:${safeExtGet('anjlabIABVersion', '1.0.44')}" | ||
} |