diff --git a/README.md b/README.md index 55cc9a3..47487aa 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,48 @@ Link `$ react-native link` +#### Manual installation + +**Android:** + +1. In your android/settings.gradle file, make the following additions: +```java +include ':react-native-version-number' +project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android') +``` + +2. In your android/app/build.gradle file, add the `:react-native-version-number` project as a compile-time dependency: + +```java +... +dependencies { + ... + compile project(':react-native-version-number') +} +``` + +3. Update the MainApplication.java file to use `react-native-version-number` via the following changes: + +```java +import com.apsl.versionnumber.RNVersionNumberPackage; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + ... + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new RNVersionNumberPackage(), // here + ); + } + }; + ... +} +``` + + ## Usage ```javascript import VersionNumber from 'react-native-version-number';