Requirements:
- Node 10.20.1 LTS
For Android:
- Java 8 (OpenJDK works)
- Android SDK 9.0
Check requirements above to know the specific versions to install.
- Install NodeJS. Using nvm is recommended, instead of global node installation.
- Run
npm install
to install project dependencies.
For Android testing and building:
- Install Java.
- Install Android Studio.
- Install Android SDK version needed using SDK Manager (from Android Studio).
Create a new file named 'secrets.js' on the root directory.
On secrets.js, add a constant with name 'YOUTUBE_API_KEY' that contains the api key of YouTube API for Moravec by adding the following line:
export const YOUTUBE_API_KEY = "paste_key_here";
Run npm start
With the app started in background, run the following:
- Android:
react-native run-android
- iOS:
react-native run-ios
Shake the device to open up Developer's Menu on the phone.
Note: The app has to be started in background (see above) to run integration test suite.
Just set ENVFILE var to '.env.test' before running the app.
Run integration tests on Android with:
ENVFILE=.env.test cavy run-android
Run integration tests on iOS with:
ENVFILE=.env.test cavy run-ios
Copy APK signature config (gradle.properties and .keystore file) into android/app.
Run Unit tests with:
jest __tests__
Run integration tests on Android with:
ENVFILE=.env.test cavy run-android
Run integration tests on iOS with:
ENVFILE=.env.test cavy run-ios
Make sure all tests pass before proceeding.
- Change
version
string inpackage.json
. - Change
android:versionName
andandroid:versionCode
(increase by 1) inandroid/app/src/main/AndroidManifiest.xml
- Change
versionName
andversionCode
(increase by 1) inandroid/app/build.gradle
- Change
CFBundleShortVersionString
andCFBundleVersion
(increase by 1) inios/Moravec/Info.plist
- Commit the changes on master and push
Run
./deploy_sourcemaps [VERSION_NUMBER]
on the terminal, replacing [VERSION_NUMBER] accordingly.
Build with:
cd android
ENVFILE=.env.production ./gradlew assembleRelease
Optional - Build AND install release:
cd android
ENVFILE=.env.production ./gradlew installRelease
Build the release using XCode.
The build probably is not being rebuilt. Make a manual random change on index.js
to force rebuild.