-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathandroid-debug.sh
36 lines (32 loc) · 1.02 KB
/
android-debug.sh
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
node node_modules/vite/bin/vite.js build --mode android
rm -rf ./bundle
mkdir bundle
npx cap add android
npx cap copy android
rm -rf ../dist
npx capacitor-assets generate --android
# Set build number
# build=$(cat buildnumber)
# newbuild=$(($build+1))
# node_modules/capacitor-set-version/bin/run set:android -v $1 -b $newbuild
cd android
# To enable persistent cookies
echo "package com.wwwallet.app;
import android.webkit.CookieManager;
import com.getcapacitor.BridgeActivity;
public class MainActivity extends BridgeActivity {
@Override
public void onPause() {
super.onPause();
CookieManager.getInstance().flush();
}
}" > ./app/src/main/java/com/wwwallet/app/MainActivity.java
./gradlew assembleDebug
mv app/build/outputs/apk/debug/app-debug.apk ../bundle/wwwallet-debug.apk
cd ..
rm -rf ./android
# Sign bundle
# cd bundle
# jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore ~/keys/wwwallet.jks -signedjar wwwallet.aab wwwallet-unsigned.aab wwwallet
# rm wwwallet-unsigned.aab
# echo $newbuild > ../buildnumber