-
반응형
Fastlane Android 의 경우, iOS와 다르게 flutter build android -release 옵션으로 한번만 빌드해도 충분하다.
그럼 마저 후다닥 ..
저번 Flutter 글에서 이어서 작성하시면 됩니다
https://jooeungen.tistory.com/entry/Flutter-Fastlane-이용해서-배포-자동화-하기-2-Flutter-설정
[Flutter] Fastlane 이용해서 배포 자동화 하기 #2 Flutter 설정
Fastlane iOS 설정에 이어서 Flutter 설정도 해보겠습니다~~ [Flutter] Fastlane 이용해서 배포 자동화 하기 #1 iOS 설정 Flutter를 사용한다고 해도, 결국 각 플랫폼 폴더 /ios /android 에서 각각 설정을 해줘야 한
jooeungen.tistory.com
아래 코드를 deploy.sh 의 ios 섹션 아래 붙여넣는다.
flutter로 빌드하고 바로 android 폴더로 이동해서 fastlane firebase, release를 진행 한다.
if [[ $platform == "android" || $platform == "all" ]]; then# Fastlane Androidcase $environment infirebase)echo "Building Android Flutter app..."flutter build apk --release --dart-define=app.flavor=production --flavor production# Fastlane Androidecho "Deploying to Android Firebase..."cd ./androidbundle exec fastlane firebasecd ..;;release)echo "Building Android Flutter app..."flutter build appbundle --release --dart-define=app.flavor=production --flavor production# Fastlane Androidecho "Deploying to Android PlayStore..."cd ./androidbundle exec fastlane releasecd ..;;*)echo 'Please type environments: "firebase", "release"';;esac그리고 /android 폴더에가서 ios와 마찬가지로 fastlane init을 해준다.
################################################ Firebase Beta Distribution ##################################################desc "Deploy a new beta version to the Firebase"lane :firebase dosh("(cd .. && flutter build apk --release --flavor=beta --dart-define=app.flavor=beta)")firebase_app_distribution(app: FIREBASE_APP_ID_BETA,android_artifact_path: "../build/app/outputs/apk/beta/release/app-beta-release.apk",groups: "inhouse-tester")send_slack_notification(attachment_properties: {fields: [{title: "Environment",short: false,value: "🔥 Firebase Beta"}]})end안드는 iOS에 비해서 코드가 간결하다. 굿
이제 이 코드를 github action으로 옮기는 일만 남았다 ..
반응형'개발' 카테고리의 다른 글
[Flutter] 프로젝트 시작하기 - Firebase 적용 (0) 2024.02.16 Xcode 15 업데이트 후 Flutter project 에서 ARC Semantic Issue 나는 것 해결 (1) 2023.11.24 Cocoapod 과 bundler (1) 2023.11.20 Realm Encryption 사용시 Encryption Export Regulations 설정하기 (1) 2023.11.17 [AppStore] access to cloud-managed distribution certificates 문제 해결 (0) 2023.08.01