|
1 | 1 | # APPetit
|
2 | 2 | Final version of the app
|
| 3 | + |
| 4 | +### Installation on OSX |
| 5 | + |
| 6 | +**Install Android-SDK** |
| 7 | +`brew cask install android-sdk` |
| 8 | + |
| 9 | +**Export ANDROID_HOME** |
| 10 | +`export ANDROID_HOME=/usr/local/Caskroom/android-sdk/{android_sdk version number}` |
| 11 | + |
| 12 | +**Install OpenJdk8** |
| 13 | +`brew cask install adoptopenjdk/openjdk/adoptopenjdk8` |
| 14 | + |
| 15 | +**Ensure OpenJdk8 is used** |
| 16 | +`export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home` |
| 17 | + |
| 18 | +**Accept Androind-SDK Licence** |
| 19 | +``` |
| 20 | +cd /usr/local/Caskroom/android-sdk/{android_sdk version number}/tools/bin |
| 21 | +yes | sdkmanager --licenses && sdkmanager --update |
| 22 | +``` |
| 23 | + |
| 24 | +**Get the Google Services Json** |
| 25 | + - Sign in to Firebase, then create your project |
| 26 | + - Add a name for your project and select the appropriate settings, then click on Create project. |
| 27 | + - Click Settings icon, then select Project settings |
| 28 | + - In the `Your apps` card, select the platform for the app you want created. |
| 29 | + - Follow the required steps to add Firebase to your Android app. Here are the steps: |
| 30 | + - Step 1 - Register app |
| 31 | + - Package name : `com.mad.customer` |
| 32 | + - Create local keystore file from command line : `keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000` |
| 33 | + - Get the local debug certificate fingerprint : `keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore` |
| 34 | + - Step 2 - Download config file `google-services.json` |
| 35 | + - Step 3 - Move `google-services.json` to `{APPetit root folder}/customer/` |
| 36 | + - Step 4 - Edit `{APPetit root folder}/build.gradle`, change `classpath` to `com.google.gms:google-services:4.3.3` (or whatever google tells you) |
| 37 | + |
| 38 | +**Build the app** |
| 39 | +``` |
| 40 | +cd {APPetit root folder}/customer/ |
| 41 | +gradle build # apk is now located in {APPetit root folder}/customer/outputs/build/apk/debug and {APPetit root folder}/customer/outputs/build/apk/release |
| 42 | +``` |
0 commit comments