From 223eb659a73e2a42f119bdd197bcd41b00e4b09d Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 2 Sep 2024 17:46:39 +0200 Subject: android: set up --- .gitignore | 3 ++- README.md | 22 ++++++++++++++++++++++ android/keystores/release.keystore | Bin 0 -> 2246 bytes app.json | 3 ++- eas.json | 18 ++++++++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 android/keystores/release.keystore create mode 100644 eas.json diff --git a/.gitignore b/.gitignore index 6623142..2558aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ web-build/ # The following patterns were generated by expo-cli expo-env.d.ts -# @end expo-cli \ No newline at end of file +# @end expo-cli +credentials.json diff --git a/README.md b/README.md index 4833bbf..11e2674 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,25 @@ # .env EXPO_PUBLIC_API_URL= ``` + +# Set up for android + +1. Generate a release key + +``` +keytool -genkey -v -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -storepass KEYSTORE_PASSWORD -keypass KEY_PASSWORD -alias cas4 -keystore release.keystore -dname "CN=Santo Cariotti, OU=Unknown, O=Unknown, L=Bologna, ST=Italy, C=IT" +``` + +2. Build Android app + +``` +eas build --platform android +``` + +3. Download the artifact from Expo page + +4. Create APKS from the AAB file + +``` +java -jar bundletool-all-1.17.1.jar build-apks --bundle=application-XXXX.aab --output=cas.apks --mode=universal --ks android/keystores/release.keystore --ks-key-alias=cas4 +``` diff --git a/android/keystores/release.keystore b/android/keystores/release.keystore new file mode 100644 index 0000000..87d1b86 Binary files /dev/null and b/android/keystores/release.keystore differ diff --git a/app.json b/app.json index e738c1e..f97e85b 100644 --- a/app.json +++ b/app.json @@ -19,7 +19,8 @@ "adaptiveIcon": { "foregroundImage": "./assets/images/adaptive-icon.png", "backgroundColor": "#ffffff" - } + }, + "package": "com.unibo.cas4" }, "web": { "bundler": "metro", diff --git a/eas.json b/eas.json new file mode 100644 index 0000000..0ad80b5 --- /dev/null +++ b/eas.json @@ -0,0 +1,18 @@ +{ + "cli": { + "version": ">= 11.0.3" + }, + "build": { + "development": { + "developmentClient": true, + "distribution": "internal" + }, + "preview": { + "distribution": "internal" + }, + "production": {} + }, + "submit": { + "production": {} + } +} -- cgit v1.2.3-18-g5258