diff --git a/android/build.gradle b/android/build.gradle index e09fb274..0ac3682a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,15 @@ 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', 28) defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 28) versionCode 1 versionName "1.0" ndk { diff --git a/package.json b/package.json index f1efa27f..db6494f9 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,5 @@ "bugs": { "url": "https://github.com/yamill/react-native-orientation/issues" }, - "homepage": "https://github.com/yamill/react-native-orientation#readme", - "rnpm": { - "android": { - "packageInstance": "new OrientationPackage()" - }, - "ios": { - "project": "iOS/RCTOrientation.xcodeproj" - } - } + "homepage": "https://github.com/yamill/react-native-orientation#readme" } diff --git a/react-native.config.js b/react-native.config.js new file mode 100644 index 00000000..f62c92ce --- /dev/null +++ b/react-native.config.js @@ -0,0 +1,10 @@ +module.exports = { + rnpm: { + "android": { + "packageInstance": "new OrientationPackage()" + }, + "ios": { + "project": "iOS/RCTOrientation.xcodeproj" + } + } +};