feat: Enforce portrait orientation across platforms and switch Android Fastlane deployment from APK to AAB.
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Failing after 13m51s
Some checks failed
Deploy Flutter to Firebase / deploy-android (push) Failing after 13m51s
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
desc "Déploiement Firebase via Gitea"
|
||||
desc "Déploiement AAB vers Firebase"
|
||||
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
|
||||
# 1. Décoder le Keystore
|
||||
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
|
||||
sh("flutter build apk --release")
|
||||
# 2. Construire l'App Bundle (.aab) au lieu de l'APK
|
||||
# Note : Cela prend souvent un peu plus de RAM
|
||||
sh("flutter build appbundle --release")
|
||||
|
||||
# 3. Envoyer à Firebase
|
||||
# 3. Envoyer vers 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']}"
|
||||
# --- CHANGEMENT IMPORTANT ICI ---
|
||||
# On pointe vers le fichier AAB généré
|
||||
android_artifact_path: "../build/app/outputs/bundle/release/app-release.aab",
|
||||
release_notes: "Version AAB via Gitea. Commit: #{ENV['GITHUB_SHA']}"
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -65,15 +65,11 @@
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:travel_mate/blocs/balance/balance_bloc.dart';
|
||||
@@ -47,6 +48,10 @@ import 'package:intl/date_symbol_data_local.dart';
|
||||
/// initializes Firebase, and starts the application.
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
await dotenv.load(fileName: ".env");
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
await initializeDateFormatting('fr_FR', null);
|
||||
|
||||
Reference in New Issue
Block a user