Compare commits
23 Commits
bf48971dc4
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5b2be5245 | ||
|
|
0fb1634a91 | ||
|
|
8634edc916 | ||
|
|
1211569078 | ||
|
|
26b970982c | ||
|
|
e77393dd13 | ||
|
|
020fa8823d | ||
|
|
959fc33fe4 | ||
|
|
a57fc811d8 | ||
|
|
a96084ba17 | ||
|
|
b96c988e80 | ||
|
|
14d2761832 | ||
|
|
bd3fd28d3c | ||
|
|
e8ef20d046 | ||
|
|
9fc8d5d1de | ||
|
|
73db84896a | ||
|
|
9734532491 | ||
|
|
7d38f54123 | ||
|
|
d02a627b86 | ||
|
|
6ce40dd2d6 | ||
|
|
00ffdcf10b | ||
|
|
e4d38692fe | ||
|
|
1f93a4e42d |
55
.gitea/workflows/deploy-android.yaml
Normal file
55
.gitea/workflows/deploy-android.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Deploy Flutter to Firebase
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: release # Vous avez changé la branche ici, c'est noté
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-android:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Accept Android Licenses
|
||||||
|
run: yes | flutter doctor --android-licenses || true
|
||||||
|
|
||||||
|
- name: Setup Ruby (pour Fastlane)
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: '3.3'
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Créer le fichier .env
|
||||||
|
run: echo "${{ secrets.ENV_FILE }}" > .env
|
||||||
|
|
||||||
|
- name: Créer le fichier Auth Google
|
||||||
|
run: echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json
|
||||||
|
|
||||||
|
- name: Créer key.properties
|
||||||
|
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > ./android/key.properties
|
||||||
|
|
||||||
|
- name: Lancer Fastlane Android
|
||||||
|
working-directory: ./android
|
||||||
|
env:
|
||||||
|
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||||
|
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
|
||||||
|
# --- C'EST ICI LA CORRECTION CRITIQUE POUR LA MÉMOIRE ---
|
||||||
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-Xmx1536m"
|
||||||
|
run: |
|
||||||
|
bundle install
|
||||||
|
bundle exec fastlane deploy_firebase
|
||||||
55
.github/workflows/deploy-playstore.yml
vendored
55
.github/workflows/deploy-playstore.yml
vendored
@@ -1,55 +0,0 @@
|
|||||||
name: Deploy to Play Store
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- release # L'action se déclenche uniquement sur la branche 'release'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_and_deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 1. Récupérer le code
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# 2. Installer Java (requis pour Android build)
|
|
||||||
- uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
# 3. Installer Flutter
|
|
||||||
- uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: 'stable'
|
|
||||||
|
|
||||||
# 4. Gérer les dépendances
|
|
||||||
- run: flutter pub get
|
|
||||||
|
|
||||||
# 5. Créer le Keystore depuis le secret (Décodage)
|
|
||||||
- name: Decode Keystore
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks
|
|
||||||
|
|
||||||
# 6. Créer le fichier key.properties pour que Gradle trouve la clé
|
|
||||||
- name: Create key.properties
|
|
||||||
run: |
|
|
||||||
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" > android/key.properties
|
|
||||||
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
|
|
||||||
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
|
|
||||||
echo "storeFile=upload-keystore.jks" >> android/key.properties
|
|
||||||
|
|
||||||
# 7. Construire l'AppBundle (.aab)
|
|
||||||
- name: Build AppBundle
|
|
||||||
run: flutter build appbundle --release
|
|
||||||
|
|
||||||
# 8. Uploader sur le Play Store (Track: alpha = Test fermé)
|
|
||||||
- name: Upload to Play Store
|
|
||||||
uses: r0adkll/upload-google-play@v1
|
|
||||||
with:
|
|
||||||
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_CONFIG_JSON }}
|
|
||||||
packageName: be.devdayronvl.travel_mate
|
|
||||||
releaseFiles: build/app/outputs/bundle/release/app-release.aab
|
|
||||||
track: alpha # 'alpha' correspond souvent au Test Fermé. Sinon 'internal' ou 'beta'.
|
|
||||||
status: completed
|
|
||||||
6
android/Gemfile
Normal file
6
android/Gemfile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "fastlane"
|
||||||
|
|
||||||
|
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
|
||||||
|
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
||||||
241
android/Gemfile.lock
Normal file
241
android/Gemfile.lock
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
CFPropertyList (3.0.8)
|
||||||
|
abbrev (0.1.2)
|
||||||
|
addressable (2.8.8)
|
||||||
|
public_suffix (>= 2.0.2, < 8.0)
|
||||||
|
artifactory (3.0.17)
|
||||||
|
atomos (0.1.3)
|
||||||
|
aws-eventstream (1.4.0)
|
||||||
|
aws-partitions (1.1191.0)
|
||||||
|
aws-sdk-core (3.239.2)
|
||||||
|
aws-eventstream (~> 1, >= 1.3.0)
|
||||||
|
aws-partitions (~> 1, >= 1.992.0)
|
||||||
|
aws-sigv4 (~> 1.9)
|
||||||
|
base64
|
||||||
|
bigdecimal
|
||||||
|
jmespath (~> 1, >= 1.6.1)
|
||||||
|
logger
|
||||||
|
aws-sdk-kms (1.118.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.239.1)
|
||||||
|
aws-sigv4 (~> 1.5)
|
||||||
|
aws-sdk-s3 (1.206.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.234.0)
|
||||||
|
aws-sdk-kms (~> 1)
|
||||||
|
aws-sigv4 (~> 1.5)
|
||||||
|
aws-sigv4 (1.12.1)
|
||||||
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
|
babosa (1.0.4)
|
||||||
|
base64 (0.2.0)
|
||||||
|
bigdecimal (3.3.1)
|
||||||
|
claide (1.1.0)
|
||||||
|
colored (1.2)
|
||||||
|
colored2 (3.1.2)
|
||||||
|
commander (4.6.0)
|
||||||
|
highline (~> 2.0.0)
|
||||||
|
csv (3.3.5)
|
||||||
|
declarative (0.0.20)
|
||||||
|
digest-crc (0.7.0)
|
||||||
|
rake (>= 12.0.0, < 14.0.0)
|
||||||
|
domain_name (0.6.20240107)
|
||||||
|
dotenv (2.8.1)
|
||||||
|
emoji_regex (3.2.3)
|
||||||
|
excon (0.112.0)
|
||||||
|
faraday (1.10.4)
|
||||||
|
faraday-em_http (~> 1.0)
|
||||||
|
faraday-em_synchrony (~> 1.0)
|
||||||
|
faraday-excon (~> 1.1)
|
||||||
|
faraday-httpclient (~> 1.0)
|
||||||
|
faraday-multipart (~> 1.0)
|
||||||
|
faraday-net_http (~> 1.0)
|
||||||
|
faraday-net_http_persistent (~> 1.0)
|
||||||
|
faraday-patron (~> 1.0)
|
||||||
|
faraday-rack (~> 1.0)
|
||||||
|
faraday-retry (~> 1.0)
|
||||||
|
ruby2_keywords (>= 0.0.4)
|
||||||
|
faraday-cookie_jar (0.0.8)
|
||||||
|
faraday (>= 0.8.0)
|
||||||
|
http-cookie (>= 1.0.0)
|
||||||
|
faraday-em_http (1.0.0)
|
||||||
|
faraday-em_synchrony (1.0.1)
|
||||||
|
faraday-excon (1.1.0)
|
||||||
|
faraday-httpclient (1.0.1)
|
||||||
|
faraday-multipart (1.1.1)
|
||||||
|
multipart-post (~> 2.0)
|
||||||
|
faraday-net_http (1.0.2)
|
||||||
|
faraday-net_http_persistent (1.2.0)
|
||||||
|
faraday-patron (1.0.0)
|
||||||
|
faraday-rack (1.0.0)
|
||||||
|
faraday-retry (1.0.3)
|
||||||
|
faraday_middleware (1.2.1)
|
||||||
|
faraday (~> 1.0)
|
||||||
|
fastimage (2.4.0)
|
||||||
|
fastlane (2.229.1)
|
||||||
|
CFPropertyList (>= 2.3, < 4.0.0)
|
||||||
|
abbrev (~> 0.1.2)
|
||||||
|
addressable (>= 2.8, < 3.0.0)
|
||||||
|
artifactory (~> 3.0)
|
||||||
|
aws-sdk-s3 (~> 1.0)
|
||||||
|
babosa (>= 1.0.3, < 2.0.0)
|
||||||
|
base64 (~> 0.2.0)
|
||||||
|
bundler (>= 1.12.0, < 3.0.0)
|
||||||
|
colored (~> 1.2)
|
||||||
|
commander (~> 4.6)
|
||||||
|
csv (~> 3.3)
|
||||||
|
dotenv (>= 2.1.1, < 3.0.0)
|
||||||
|
emoji_regex (>= 0.1, < 4.0)
|
||||||
|
excon (>= 0.71.0, < 1.0.0)
|
||||||
|
faraday (~> 1.0)
|
||||||
|
faraday-cookie_jar (~> 0.0.6)
|
||||||
|
faraday_middleware (~> 1.0)
|
||||||
|
fastimage (>= 2.1.0, < 3.0.0)
|
||||||
|
fastlane-sirp (>= 1.0.0)
|
||||||
|
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||||
|
google-apis-androidpublisher_v3 (~> 0.3)
|
||||||
|
google-apis-playcustomapp_v1 (~> 0.1)
|
||||||
|
google-cloud-env (>= 1.6.0, < 2.0.0)
|
||||||
|
google-cloud-storage (~> 1.31)
|
||||||
|
highline (~> 2.0)
|
||||||
|
http-cookie (~> 1.0.5)
|
||||||
|
json (< 3.0.0)
|
||||||
|
jwt (>= 2.1.0, < 3)
|
||||||
|
mini_magick (>= 4.9.4, < 5.0.0)
|
||||||
|
multipart-post (>= 2.0.0, < 3.0.0)
|
||||||
|
mutex_m (~> 0.3.0)
|
||||||
|
naturally (~> 2.2)
|
||||||
|
nkf (~> 0.2.0)
|
||||||
|
optparse (>= 0.1.1, < 1.0.0)
|
||||||
|
plist (>= 3.1.0, < 4.0.0)
|
||||||
|
rubyzip (>= 2.0.0, < 3.0.0)
|
||||||
|
security (= 0.1.5)
|
||||||
|
simctl (~> 1.6.3)
|
||||||
|
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||||
|
terminal-table (~> 3)
|
||||||
|
tty-screen (>= 0.6.3, < 1.0.0)
|
||||||
|
tty-spinner (>= 0.8.0, < 1.0.0)
|
||||||
|
word_wrap (~> 1.0.0)
|
||||||
|
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||||
|
xcpretty (~> 0.4.1)
|
||||||
|
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
|
||||||
|
fastlane-plugin-firebase_app_distribution (0.10.1)
|
||||||
|
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
|
||||||
|
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
|
||||||
|
fastlane-sirp (1.0.0)
|
||||||
|
sysrandom (~> 1.0)
|
||||||
|
gh_inspector (1.1.3)
|
||||||
|
google-apis-androidpublisher_v3 (0.54.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-apis-core (0.11.3)
|
||||||
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
|
httpclient (>= 2.8.1, < 3.a)
|
||||||
|
mini_mime (~> 1.0)
|
||||||
|
representable (~> 3.0)
|
||||||
|
retriable (>= 2.0, < 4.a)
|
||||||
|
rexml
|
||||||
|
google-apis-firebaseappdistribution_v1 (0.3.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-apis-firebaseappdistribution_v1alpha (0.2.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-apis-iamcredentials_v1 (0.17.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-apis-playcustomapp_v1 (0.13.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-apis-storage_v1 (0.31.0)
|
||||||
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
|
google-cloud-core (1.8.0)
|
||||||
|
google-cloud-env (>= 1.0, < 3.a)
|
||||||
|
google-cloud-errors (~> 1.0)
|
||||||
|
google-cloud-env (1.6.0)
|
||||||
|
faraday (>= 0.17.3, < 3.0)
|
||||||
|
google-cloud-errors (1.5.0)
|
||||||
|
google-cloud-storage (1.47.0)
|
||||||
|
addressable (~> 2.8)
|
||||||
|
digest-crc (~> 0.4)
|
||||||
|
google-apis-iamcredentials_v1 (~> 0.1)
|
||||||
|
google-apis-storage_v1 (~> 0.31.0)
|
||||||
|
google-cloud-core (~> 1.6)
|
||||||
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
|
mini_mime (~> 1.0)
|
||||||
|
googleauth (1.8.1)
|
||||||
|
faraday (>= 0.17.3, < 3.a)
|
||||||
|
jwt (>= 1.4, < 3.0)
|
||||||
|
multi_json (~> 1.11)
|
||||||
|
os (>= 0.9, < 2.0)
|
||||||
|
signet (>= 0.16, < 2.a)
|
||||||
|
highline (2.0.3)
|
||||||
|
http-cookie (1.0.8)
|
||||||
|
domain_name (~> 0.5)
|
||||||
|
httpclient (2.9.0)
|
||||||
|
mutex_m
|
||||||
|
jmespath (1.6.2)
|
||||||
|
json (2.17.1)
|
||||||
|
jwt (2.10.2)
|
||||||
|
base64
|
||||||
|
logger (1.7.0)
|
||||||
|
mini_magick (4.13.2)
|
||||||
|
mini_mime (1.1.5)
|
||||||
|
multi_json (1.18.0)
|
||||||
|
multipart-post (2.4.1)
|
||||||
|
mutex_m (0.3.0)
|
||||||
|
nanaimo (0.4.0)
|
||||||
|
naturally (2.3.0)
|
||||||
|
nkf (0.2.0)
|
||||||
|
optparse (0.8.0)
|
||||||
|
os (1.1.4)
|
||||||
|
plist (3.7.2)
|
||||||
|
public_suffix (7.0.0)
|
||||||
|
rake (13.3.1)
|
||||||
|
representable (3.2.0)
|
||||||
|
declarative (< 0.1.0)
|
||||||
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||||
|
uber (< 0.2.0)
|
||||||
|
retriable (3.1.2)
|
||||||
|
rexml (3.4.4)
|
||||||
|
rouge (3.28.0)
|
||||||
|
ruby2_keywords (0.0.5)
|
||||||
|
rubyzip (2.4.1)
|
||||||
|
security (0.1.5)
|
||||||
|
signet (0.21.0)
|
||||||
|
addressable (~> 2.8)
|
||||||
|
faraday (>= 0.17.5, < 3.a)
|
||||||
|
jwt (>= 1.5, < 4.0)
|
||||||
|
multi_json (~> 1.10)
|
||||||
|
simctl (1.6.10)
|
||||||
|
CFPropertyList
|
||||||
|
naturally
|
||||||
|
sysrandom (1.0.5)
|
||||||
|
terminal-notifier (2.0.0)
|
||||||
|
terminal-table (3.0.2)
|
||||||
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
|
trailblazer-option (0.1.2)
|
||||||
|
tty-cursor (0.7.1)
|
||||||
|
tty-screen (0.8.2)
|
||||||
|
tty-spinner (0.9.3)
|
||||||
|
tty-cursor (~> 0.7)
|
||||||
|
uber (0.1.0)
|
||||||
|
unicode-display_width (2.6.0)
|
||||||
|
word_wrap (1.0.0)
|
||||||
|
xcodeproj (1.27.0)
|
||||||
|
CFPropertyList (>= 2.3.3, < 4.0)
|
||||||
|
atomos (~> 0.1.3)
|
||||||
|
claide (>= 1.0.2, < 2.0)
|
||||||
|
colored2 (~> 3.1)
|
||||||
|
nanaimo (~> 0.4.0)
|
||||||
|
rexml (>= 3.3.6, < 4.0)
|
||||||
|
xcpretty (0.4.1)
|
||||||
|
rouge (~> 3.28.0)
|
||||||
|
xcpretty-travis-formatter (1.0.1)
|
||||||
|
xcpretty (~> 0.2, >= 0.0.7)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
arm64-darwin-25
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
fastlane
|
||||||
|
fastlane-plugin-firebase_app_distribution
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.7.2
|
||||||
@@ -30,10 +30,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
||||||
applicationId = "be.devdayronvl.travel_mate"
|
applicationId = "be.devdayronvl.travel_mate"
|
||||||
// You can update the following values to match your application needs.
|
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
||||||
minSdk = flutter.minSdkVersion
|
minSdk = flutter.minSdkVersion
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = flutter.versionCode
|
versionCode = flutter.versionCode
|
||||||
@@ -45,16 +42,18 @@ android {
|
|||||||
keyAlias = keystoreProperties["keyAlias"] as String?
|
keyAlias = keystoreProperties["keyAlias"] as String?
|
||||||
keyPassword = keystoreProperties["keyPassword"] as String?
|
keyPassword = keystoreProperties["keyPassword"] as String?
|
||||||
storeFile = if (keystoreProperties["storeFile"] != null) {
|
storeFile = if (keystoreProperties["storeFile"] != null) {
|
||||||
file(keystoreProperties["storeFile"] as String)
|
rootProject.file(keystoreProperties["storeFile"] as String)
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
storePassword = keystoreProperties["storePassword"] as String?
|
storePassword = keystoreProperties["storePassword"] as String?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
// Applique la configuration de signature définie au-dessus
|
||||||
signingConfig = signingConfigs.getByName("release")
|
signingConfig = signingConfigs.getByName("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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=""
|
||||||
|
|||||||
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
|
||||||
28
android/fastlane/Fastfile
Normal file
28
android/fastlane/Fastfile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
default_platform(:android)
|
||||||
|
|
||||||
|
platform :android do
|
||||||
|
desc "Déploiement AAB vers Firebase"
|
||||||
|
lane :deploy_firebase do
|
||||||
|
# 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'App Bundle (.aab) au lieu de l'APK
|
||||||
|
# Note : Cela prend souvent un peu plus de RAM
|
||||||
|
sh("flutter build appbundle --release")
|
||||||
|
|
||||||
|
# 3. Envoyer vers Firebase
|
||||||
|
firebase_app_distribution(
|
||||||
|
app: ENV["FIREBASE_ANDROID_APP_ID"],
|
||||||
|
service_credentials_file: "firebase_credentials.json",
|
||||||
|
groups: "testers",
|
||||||
|
# --- 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
|
||||||
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'
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -41,12 +41,9 @@ class _TripCardState extends State<TripCard> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// D'abord vérifier si une image existe déjà dans le Storage
|
|
||||||
String? imageUrl = await _placeImageService.getExistingImageUrl(
|
String? imageUrl = await _placeImageService.getExistingImageUrl(
|
||||||
widget.trip.location,
|
widget.trip.location,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Si aucune image n'existe, en télécharger une nouvelle
|
|
||||||
imageUrl ??= await _placeImageService.getPlaceImageUrl(
|
imageUrl ??= await _placeImageService.getPlaceImageUrl(
|
||||||
widget.trip.location,
|
widget.trip.location,
|
||||||
);
|
);
|
||||||
@@ -57,7 +54,6 @@ class _TripCardState extends State<TripCard> {
|
|||||||
_isLoadingImage = false;
|
_isLoadingImage = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Mettre à jour le voyage dans la base de données avec l'imageUrl
|
|
||||||
_updateTripWithImage(imageUrl);
|
_updateTripWithImage(imageUrl);
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -76,18 +72,13 @@ class _TripCardState extends State<TripCard> {
|
|||||||
Future<void> _updateTripWithImage(String imageUrl) async {
|
Future<void> _updateTripWithImage(String imageUrl) async {
|
||||||
try {
|
try {
|
||||||
if (widget.trip.id != null) {
|
if (widget.trip.id != null) {
|
||||||
// Créer une copie du voyage avec la nouvelle imageUrl
|
|
||||||
final updatedTrip = widget.trip.copyWith(
|
final updatedTrip = widget.trip.copyWith(
|
||||||
imageUrl: imageUrl,
|
imageUrl: imageUrl,
|
||||||
updatedAt: DateTime.now(),
|
updatedAt: DateTime.now(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Mettre à jour dans la base de données
|
|
||||||
await _tripRepository.updateTrip(widget.trip.id!, updatedTrip);
|
await _tripRepository.updateTrip(widget.trip.id!, updatedTrip);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
// En cas d'erreur, on continue sans échec - l'image reste affichée localement
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildImageWidget() {
|
Widget _buildImageWidget() {
|
||||||
|
|||||||
@@ -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