Generate AAB(App bundle) from source code
Steps how to generate ABB from source code
Source Code references
Open Terminal and clone source code
git clone https://github.com/Sunbird-Saral/Project-Saral.git
Refer
Source Code Repositoryfor latest repository location.
Change Directory to
Project-Saral/
folder and switch to release tag as per release notes.git checkout tags/<tag_name>
$FRONTEND_FOLDER = Project-Saral/v1.0/frontend
$BACKEND_FOLDER = Project-Saral/v1.0/backend
Saral v1.0 Android App bundling/packaging
Follow Frontend Setup steps @ Workspace Setup - Playbook
App Icon can be customised/replaced by generating App icon using standard icon editors and replace icons in below folders.
$FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-mdpi
$FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-hdpi
$FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xhdpi
$FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xxhdpi
$FRONTEND_FOLDER\SaralApp\android\app\src\main\res\mipmap-xxxhdpi
Open Terminal in
$FRONTEND_FOLDER
/SaralApp/android
folder
./gradlew clean
AAB Signing can be enabled using the below Gradle files. Make sure the Keystore file is to be used for signing placed in
$FRONTEND_FOLDER
/SaralApp/android/app
folder.
$FRONTEND_FOLDER
/SaralApp/android/gradle.properties
$FRONTEND_FOLDER
/SaralApp/android/app/build.gradle
Note: Make sure signingConfig signingConfigs.release
the line is uncommented.
Update
google-services.json
file in$FRONTEND_FOLDER
/SaralApp/android/app
folder.Edit
$FRONTEND_FOLDER
/SaralApp/src/config/config.js
to change apkVersionId , apkURL, BASE_URL as per the implementation.Open Terminal in
$FRONTEND_FOLDER
/SaralApp/android
folder
./gradlew bundleRelease
(OR)
./gradlew bundleDebug
You can find the release .aab file in
Project-Saral/v1.0/frontend/SaralApp/android/app/build/outputs/bundle/release or debug
folder.
Note: If releasing AAB file for a client/implementation, recommended creating a sub-branch(say v1.0.0-beta.1-up-apk) from release tag and modify implementation-specific Base URL.
Open terminal from
$FRONTEND_FOLDER
/SaralApp/android
folder and execute the below command to verify if AAB signature.
jarsigner -verbose -verify ./app/build/outputs/apk/release/app-release.aab
AAB file can't be used for installation and testing directly. Its for publishing to playstore. Once AAB file is generated , use below command to generate universal APK for installation and testing before publishing to Google play-store.
Download Bundletool from Bundle Tool Releases
java -jar <bundletool-all-1.10.0.jar> build-apks --bundle=app-release.aab --output=app-release.apks --mode=universal --ks=keystore.jks --ks-pass=pass:your_keystore_password --ks-key-alias=your_key_alias --key-pass=pass:your_key_password
Last updated