This is a simple build script designed for automating the process of building APK and AAB packages for Android apps exported from GDevelop using Cordova.
- Automates the process of building APK and AAB packages.
- Designed specifically for GDevelop-exported Android apps.
- Supports cleaning of build files.
Before using the script, make sure you have the following installed:
- Cordova CLI
- Node.js
- Android SDK and JDK set up correctly
- Environment variables for your keystore:
KEYSTORE_PATHKEYSTORE_PASSWORDKEYSTORE_ALIAS
-
Clone this repository to your local machine:
git clone https://github.com/trinajstica/cordova-build-script.git cd cordova-build-script -
Make sure you have the required dependencies for Cordova and Android:
npm install -g cordova
-
Set up your keystore environment variables:
export KEYSTORE_PATH="your_keystore_path" export KEYSTORE_PASSWORD="your_keystore_password" export KEYSTORE_ALIAS="your_keystore_alias"
The script supports three commands:
To build an APK package, run:
./build apkTo build an AAB package, run:
./build aabTo clean up the build-related files (APK, AAB, platforms, node_modules, etc.), run:
./build cleanMake sure your GDevelop project has been exported as an Android project before running the script. If you don't specify a command, the script will show usage instructions.
This project is licensed under the MIT License - see the LICENSE file for details.