diff --git a/README.md b/README.md index 47487aa..3186ee2 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Install the package Link -`$ react-native link` +`$ react-native link react-native-version-number` #### Manual installation diff --git a/android/build.gradle b/android/build.gradle index 0b9bdd3..1c3d042 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,13 +1,17 @@ apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 27 +def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3" +def DEFAULT_TARGET_SDK_VERSION = 27 + android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" ndk { @@ -20,6 +24,6 @@ android { } dependencies { - compile 'com.facebook.react:react-native:+' + implementation 'com.facebook.react:react-native:+' } - + diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..1d6d347 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,5 @@ +declare module 'react-native-version-number' { + export const appVersion: string + export const buildVersion: string + export const bundleIdentifier: string +} \ No newline at end of file diff --git a/package.json b/package.json index 61339c4..5d11c3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-version-number", - "version": "0.3.4", + "version": "0.3.6", "description": "Access app version inside React Native", "main": "index.js", "scripts": { @@ -11,8 +11,18 @@ "type": "git", "url": "https://github.com/APSL/react-native-version-number.git" }, - "tags": ["react", "react-native", "react-component", "ios"], - "keywords": ["react", "react-native", "ios", "react-component"], + "tags": [ + "react", + "react-native", + "react-component", + "ios" + ], + "keywords": [ + "react", + "react-native", + "ios", + "react-component" + ], "author": "Alvaro Medina Ballester ", "license": "MIT", "bugs": {