Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Install the package

Link

`$ react-native link`
`$ react-native link react-native-version-number`

#### Manual installation

Expand Down
14 changes: 9 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -20,6 +24,6 @@ android {
}

dependencies {
compile 'com.facebook.react:react-native:+'
implementation 'com.facebook.react:react-native:+'
}

5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module 'react-native-version-number' {
export const appVersion: string
export const buildVersion: string
export const bundleIdentifier: string
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add this export

Suggested change
}
export const installationSource: string
}

16 changes: 13 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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 <[email protected]>",
"license": "MIT",
"bugs": {
Expand Down