feat: Add Makefile, Fastlane configuration, and update Android build settings for release management

This commit is contained in:
Janez T
2025-12-14 19:08:11 +01:00
parent 96824e455e
commit d70f59b10f
8 changed files with 224 additions and 14 deletions

2
android/fastlane/Appfile Normal file
View File

@@ -0,0 +1,2 @@
json_key_file("/Users/dz0ny/android-keystores/fastlane-480919-0cb30c62db50.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.meshcore.sar.meshcore_sar_app") # e.g. com.krausefx.app

59
android/fastlane/Fastfile Normal file
View File

@@ -0,0 +1,59 @@
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:android)
platform :android do
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Build release APK"
lane :beta do
# Get the project root directory (two levels up from android/fastlane/)
project_root = File.expand_path("../..", __dir__)
# Build APK with Flutter
sh("cd #{project_root} && flutter build apk --release")
apk_path = File.join(project_root, "build/app/outputs/flutter-apk/app-release.apk")
# Uncomment to distribute via Firebase App Distribution:
# firebase_app_distribution(
# app: "YOUR_FIREBASE_APP_ID",
# apk_path: apk_path,
# groups: "testers"
# )
UI.success("APK built at: #{apk_path}")
end
desc "Deploy a new version to the Google Play"
lane :deploy do
# Get the project root directory (two levels up from android/fastlane/)
project_root = File.expand_path("../..", __dir__)
# Build AAB with Flutter (required for Play Store since 2021)
sh("cd #{project_root} && flutter build appbundle --release")
aab_path = File.join(project_root, "build/app/outputs/bundle/release/app-release.aab")
upload_to_play_store(
aab: aab_path,
track: "internal"
)
end
end