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">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
|
|||||||
@@ -1,25 +1,28 @@
|
|||||||
default_platform(:android)
|
default_platform(:android)
|
||||||
|
|
||||||
platform :android do
|
platform :android do
|
||||||
desc "Déploiement Firebase via Gitea"
|
desc "Déploiement AAB vers Firebase"
|
||||||
lane :deploy_firebase do
|
lane :deploy_firebase do
|
||||||
# 1. Décoder le Keystore depuis les secrets Gitea (voir Phase 4)
|
# 1. Décoder le Keystore
|
||||||
# On vérifie si le fichier existe déjà pour éviter d'écraser en local
|
|
||||||
if ENV['ANDROID_KEYSTORE_BASE64']
|
if ENV['ANDROID_KEYSTORE_BASE64']
|
||||||
File.open("upload-keystore.jks", "wb") do |f|
|
File.open("upload-keystore.jks", "wb") do |f|
|
||||||
f.write(Base64.decode64(ENV['ANDROID_KEYSTORE_BASE64']))
|
f.write(Base64.decode64(ENV['ANDROID_KEYSTORE_BASE64']))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 2. Construire l'APK
|
# 2. Construire l'App Bundle (.aab) au lieu de l'APK
|
||||||
sh("flutter build apk --release")
|
# Note : Cela prend souvent un peu plus de RAM
|
||||||
|
sh("flutter build appbundle --release")
|
||||||
|
|
||||||
# 3. Envoyer à Firebase
|
# 3. Envoyer vers Firebase
|
||||||
firebase_app_distribution(
|
firebase_app_distribution(
|
||||||
app: ENV["FIREBASE_ANDROID_APP_ID"],
|
app: ENV["FIREBASE_ANDROID_APP_ID"],
|
||||||
service_credentials_file: "firebase_credentials.json",
|
service_credentials_file: "firebase_credentials.json",
|
||||||
groups: "testers",
|
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
|
||||||
end
|
end
|
||||||
@@ -65,15 +65,11 @@
|
|||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
</array>
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:travel_mate/blocs/balance/balance_bloc.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.
|
/// initializes Firebase, and starts the application.
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
await SystemChrome.setPreferredOrientations([
|
||||||
|
DeviceOrientation.portraitUp,
|
||||||
|
DeviceOrientation.portraitDown,
|
||||||
|
]);
|
||||||
await dotenv.load(fileName: ".env");
|
await dotenv.load(fileName: ".env");
|
||||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||||
await initializeDateFormatting('fr_FR', null);
|
await initializeDateFormatting('fr_FR', null);
|
||||||
|
|||||||
Reference in New Issue
Block a user