Skip to content

This library is made for getting the build config values from android native to React native javascript

License

Notifications You must be signed in to change notification settings

shivam-aditya/AndroidBuildConfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-android-build-config

Getting started

$ npm install react-native-android-build-config --save

Mostly automatic installation

$ react-native link react-native-android-build-config

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.androidbuildconfig.RNAndroidBuildConfigPackage; to the imports at the top of the file
  • Add new RNAndroidBuildConfigPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-android-build-config'
    project(':react-native-android-build-config').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-android-build-config/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-android-build-config')
    

Usage

import RNAndroidBuildConfig from 'react-native-android-build-config';

// TODO: What to do with the module?
RNAndroidBuildConfig;

About

This library is made for getting the build config values from android native to React native javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published