/
opt
/
canhelp
/
apps
/
mobile
/
android
/
fastlane
/
/opt/canhelp/apps/mobile/android/fastlane
mkdir
upload
Name
Size
Mode
Actions
metadata/
-
0755
rm
Appfile
253
0644
edit
dl
rm
Fastfile
1366
0644
edit
dl
rm
Edit:
/opt/canhelp/apps/mobile/android/fastlane/Fastfile
(1366B)
default_platform(:android) # Absolute path to apps/mobile/ (2 levels up from android/fastlane/) MOBILE_ROOT = File.expand_path("../../", __dir__) platform :android do desc "Build and upload to Play Store internal testing" lane :internal do # For release builds we always prefer the production config. # Use LOCAL_DART_DEFINES=1 to force local config explicitly. defines_file = if ENV["LOCAL_DART_DEFINES"] == "1" "config/dart_defines.local.json" else "config/dart_defines.ci.json" end # Build release AAB from apps/mobile/ Dir.chdir(MOBILE_ROOT) do sh("flutter build appbundle --release --dart-define-from-file=#{defines_file}") end play_store_json_key = ENV["PLAY_STORE_JSON_KEY"]&.strip play_store_json_key_path = File.expand_path("play-store-key.json", __dir__) upload_key_options = if play_store_json_key && !play_store_json_key.empty? { json_key_data: play_store_json_key } else { json_key: play_store_json_key_path } end # Upload to Play Store internal track upload_to_play_store( track: "internal", aab: "#{MOBILE_ROOT}/build/app/outputs/bundle/release/app-release.aab", skip_upload_metadata: true, skip_upload_images: true, skip_upload_screenshots: true, release_status: "draft", **upload_key_options ) end end
Save
cmd:
run