Skip to content

Commit b9fdbe0

Browse files
committed
Added check if the property exists
1 parent 4325e51 commit b9fdbe0

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

android/build.gradle

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@ buildscript {
1111

1212
apply plugin: 'com.android.library'
1313

14+
15+
16+
def getExtValue(rootProject,key,defaultValue ) {
17+
if (rootProject.hasProperty('ext')) {
18+
if (rootProject.ext.has(key)) {
19+
return rootProject.ext[key]
20+
}
21+
}
22+
return defaultValue
23+
}
24+
1425
android {
15-
compileSdkVersion rootProject.ext.compileSdkVersion
16-
buildToolsVersion rootProject.ext.buildToolsVersion
26+
compileSdkVersion getExtValue(rootProject,'compileSdkVersion',23)
27+
buildToolsVersion getExtValue(rootProject,'buildToolsVersion', "23.0.1")
1728

1829
defaultConfig {
19-
minSdkVersion rootProject.ext.minSdkVersion
20-
targetSdkVersion rootProject.ext.targetSdkVersion
30+
minSdkVersion getExtValue(rootProject,'minSdkVersion', 16)
31+
targetSdkVersion getExtValue(rootProject,'targetSdkVersion', 22)
2132
versionCode 1
2233
versionName "1.0"
2334
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-exception-handler",
3-
"version": "2.10.0",
3+
"version": "2.10.2",
44
"description": "A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)