- Buat Keystore untuk Penandatanganan Aplikasi:
keytool -genkey -v -keystore ~/my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-key-alias
-
Tambahkan Keystore dan Secrets ke Proyek Flutter: a. Buat file
key.properties
di root proyek:storePassword=<your-keystore-password> keyPassword=<your-key-password> keyAlias=my-key-alias storeFile=<path-to-your-keystore>
b. Edit file
build.gradle
diandroid/app
:def keystoreProperties = new Properties() def keystoreFile = rootProject.file('key.properties') if (keystoreFile.exists()) { keystoreProperties.load(new FileInputStream(keystoreFile)) } android { ... signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release } } }
-
Build Android App Bundle (AAB):
flutter build appbundle
- Unggah Proyek ke GitHub:
git init
git add .
git commit -m 'Initial commit'
git remote add origin <repository_url>
git push -u origin master