Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

BausCode/ops-codeship-react-native-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a basic general-purpose ReactNative/Android command line build script.

It is intended to be deployed to CodeShip for CI builds of a ReactNative app.

Things it does

Will install dependencies for and compile the Android version of your ReactNative app.

Things it doesn't

Does not run tests or create an apk. Could be edited to do that.

Dependencies

There's an .nvmrc set to default to node version 6.5.0. Change it accordingly.

If it's not present you should add a link npm script to your package.json, like so:

//...
"scripts": {
  //...
  "link": "node node_modules/react-native/local-cli/cli.js link"
}

How To Use

Setup a new CodeShip build.

Add codeship-install-android.sh to your repository at the root.

Edit the variables in codeship-install-android.sh to make sure you're using the right sdk/tools/api versions for your app.

Paste the contents of codeship-build.sh into the test setup step in CodeShip. Your setup should now look something like this:

jdk_switcher use oraclejdk8

source ./codeship-install-android.sh

nvm use || nvm install
npm install --ignore-scripts
npm run link

cd android
touch local.properties
echo "sdk.dir=$ANDROID_HOME" >> local.properties
./gradlew assembleDebug

Credit

Thanks to Jonathan Muller and Bogdan Gradinariu for the gruntwork.

About

Basic ReactNative builds on CodeShip

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages