flutter fastlane android

Minhyun Ahn·2022년 9월 24일
0

default_platform(:android)

platform :android do

  desc "Play store in internal test"
  lane :internal do
    puts ("env : #{ENV['ENV']}")

    gradle(task: "clean")
    flutter_build
    supply(
      aab:"../build/app/outputs/bundle/release/app-release.aab",
      track:"internal",
      skip_upload_metadata:true,
  	  skip_upload_images: true,
  	  skip_upload_screenshots: true,
      )
      send_slack
  end

  desc "build flutter"
  lane :flutter_build do
    sh("fvm","flutter", "clean")
    getVersionCode =  google_play_track_version_codes(track:"internal")
    puts("get version is #{getVersionCode[0]}")
    new_version=getVersionCode[0]+1
    puts("new_version is #{new_version}")
    # sh "flutter build appbundle --build-number #{new_version} --build-name #{new_version}.0.0"
    sh "fvm flutter build appbundle --dart-define=env=#{ENV['ENV']} --build-number #{new_version}"
  end


end
profile
자발개발자

0개의 댓글