Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
F
fairchat.ReactNative
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • chat
  • fairchat.ReactNative
  • Wiki
  • how to build

Last edited by Roland Alton Mar 01, 2020
Page history

how to build

How to build the app on Ubuntu 18.04

  • Clone repository and select branch fairchat-master (or mergeWith1.n.n)
    $ git clone git@git.fairkom.net:chat/fairchat.ReactNative.git
    $ cd fairchat.ReactNative
    $ git checkout fairchat-master

(or checkout the branch with latest merge from upstream Rocket.Chat-ReactNative)

  • Install OpenJDK 8 (version 11 may have problems as some libraries are deprecated like java.se.ee) and check if both java and javac are the same version 8

  • Install Android Studio custom set-up with checkboxes on for:

Android SDK
Android SDK Platform
Android Virtual Device

(see also https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment )

```bash
export ANDROID_HOME=~/Software/AndroidSDK
```
  • Install dependencies from working dir and be sure to have a stable node version (10.13 works fine, not 8, 12 is not yet supported by realm package as of Oct 2019)

    $ sudo apt install nodejs npm curl
    $ sudo npm cache clean -f
    $ sudo npm install -g n
    $ sudo n 10
    $ sudo npm install -g yarn
    $ sudo npm install -g react-native-cli 
    $ sudo chown -R $USER:$(id -gn $USER) /home/ras/.config 
    $ npm install --save realm
    $ yarn global add react-native-cli
    $ yarn config set cache-folder /media/someGBstorage/yarn/cache/
    $ yarn
  • forward 8081 ports if device is connected via USB (or change dev settings in device to connect via same WIFI to port 8081 on pc)

    $ adb reverse tcp:8081 tcp:8081
  • Run Metro handler on port 8081 in separate terminal window in same working dir

    $ npm start

You might need to restart it after major commits with new dependencies.

  • Build and run application

    $ react-native run-ios
    $ react-native run-android
  • Changing branch or merging commits requires full rebuild (react-native should not require this ...)

   $ git checkout newfeature
   $ yarn 
   $ react-native run-android
  • If you want to rebuild the storybook
yarn add --dev jest
yarn global add jest
jest --updateSnapshot

Remove checks with pre-commit (syntax checks)

rm -f .git/hooks/*

For a release build, install keystore #23 (closed) and run

 $ react-native run-android --variant=release
 ```
Clone repository
  • Home
  • how to build
  • how to publish
  • how to sync repos

gitlab project and software management by fairkom.eu - more open source web apps at fairapps.net