feat: Set up Fastlane for Android with Firebase App Distribution and adjust build configurations.
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Has been cancelled
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Has been cancelled
This commit is contained in:
2
android/fastlane/Appfile
Normal file
2
android/fastlane/Appfile
Normal file
@@ -0,0 +1,2 @@
|
||||
json_key_file("'/Users/dayronvanleemput/Documents/Coding/clé/travelmate-a47f5-1e4759031f2d.json'") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
|
||||
package_name("be.devdayronvl.travel_mate") # e.g. com.krausefx.app
|
||||
26
android/fastlane/Fastfile
Normal file
26
android/fastlane/Fastfile
Normal file
@@ -0,0 +1,26 @@
|
||||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
desc "Déploiement Firebase via Gitea"
|
||||
lane :deploy_firebase do
|
||||
# 1. Décoder le Keystore depuis les secrets Gitea (voir Phase 4)
|
||||
# On vérifie si le fichier existe déjà pour éviter d'écraser en local
|
||||
if ENV['ANDROID_KEYSTORE_BASE64']
|
||||
File.open("upload-keystore.jks", "wb") do |f|
|
||||
f.write(Base64.decode64(ENV['ANDROID_KEYSTORE_BASE64']))
|
||||
end
|
||||
end
|
||||
|
||||
# 2. Construire l'APK
|
||||
flutter_build(build: "apk")
|
||||
# Note: Fastlane a un plugin flutter, ou utilisez sh("flutter build apk --release")
|
||||
|
||||
# 3. Envoyer à Firebase
|
||||
firebase_app_distribution(
|
||||
app: ENV["FIREBASE_ANDROID_APP_ID"],
|
||||
service_credentials_file: "firebase_credentials.json",
|
||||
groups: "testers",
|
||||
release_notes: "Build automatique depuis Gitea Commit: #{ENV['GITHUB_SHA']}"
|
||||
)
|
||||
end
|
||||
end
|
||||
5
android/fastlane/Pluginfile
Normal file
5
android/fastlane/Pluginfile
Normal file
@@ -0,0 +1,5 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-firebase_app_distribution'
|
||||
Reference in New Issue
Block a user