Skip to content

Commit da31216

Browse files
committed
Add OSX build instruction
1 parent e08622b commit da31216

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,42 @@
11
# APPetit
22
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

Comments
 (0)