diff --git a/lib/android/build.gradle b/lib/android/build.gradle index c055abb..e8e7f3c 100644 --- a/lib/android/build.gradle +++ b/lib/android/build.gradle @@ -1,12 +1,20 @@ +def getExtOrDefault(name) { + return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ReactNativeKeyboardInput_' + name] +} + +def getExtOrIntegerDefault(name) { + return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeKeyboardInput_' + name]).toInteger() +} + apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion "25" + compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') + buildToolsVersion getExtOrDefault('buildToolsVersion') defaultConfig { - minSdkVersion 16 - targetSdkVersion 25 + minSdkVersion getExtOrIntegerDefault('minSdkVersion') + targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') versionCode 1 versionName "1.0" } diff --git a/lib/android/gradle.properties b/lib/android/gradle.properties new file mode 100644 index 0000000..ee05dac --- /dev/null +++ b/lib/android/gradle.properties @@ -0,0 +1,4 @@ +ReactNativeKeyboardInput_compileSdkVersion=23 +ReactNativeKeyboardInput_buildToolsVersion=25 +ReactNativeKeyboardInput_targetSdkVersion=25 +ReactNativeKeyboardInput_minSdkVersion=16 \ No newline at end of file