forked from kickstarter/android-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 2.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
bootstrap: dependencies secrets
./script/bootstrap
bootstrap-circle: dependencies secrets
./script/bootstrap_configs
dependencies: submodules secrets
submodules:
git submodule sync --recursive
git submodule update --init --recursive || true
git submodule foreach git checkout $(sha1)
secrets:
# Copy java secrets over. Fallback to example secrets if they don't exist.
-@rm -rf vendor/native-secrets
-@git clone https://github.com/kickstarter/native-secrets vendor/native-secrets 2>/dev/null || echo '(Skipping secrets.)'
cp vendor/native-secrets/android/Secrets.java app/src/main/java/com/kickstarter/libs/utils/Secrets.java \
|| cp app/src/main/java/com/kickstarter/libs/utils/Secrets.java.example app/src/main/java/com/kickstarter/libs/utils/Secrets.java
cp vendor/native-secrets/ruby/secrets.rb lib/milkrun/secrets.rb || true
cp vendor/native-secrets/fonts/ss-kickstarter.otf app/src/main/assets/fonts/ss-kickstarter.otf || true
# Copy kola configs over. Fallback to examples if they don't exist.
mkdir -p app/src/debug/res/values/
mkdir -p app/src/main/res/values/
cp vendor/native-secrets/android/koala_endpoint_debug.xml app/src/debug/res/values/koala_endpoint.xml \
|| cp config/koala_endpoint.xml.example app/src/debug/res/values/koala_endpoint.xml
cp vendor/native-secrets/android/koala_endpoint.xml app/src/main/res/values/koala_endpoint.xml \
|| cp config/koala_endpoint.xml.example app/src/main/res/values/koala_endpoint.xml
# Copy web client over.
cp -rf vendor/native-secrets/android/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java \
|| cp -rf config/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java
cp -rf vendor/native-secrets/android/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java \
|| cp -rf config/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java
mkdir -p app/src/main/assets/www/
cp vendor/native-secrets/android/WebViewJavascript.html app/src/main/assets/www/WebViewJavascript.html || true
.PHONY: bootstrap bootstrap-circle dependencies secrets