# Fastlane lanes for Play Store deployments.
opt_out_usage
default_platform(:android)

platform :android do
  desc "Deploy the existing AAB to internal testing"
  lane :internal do
    # Service account JSON: CI writes playstore-credentials.json; local can set PLAYSTORE_JSON_KEY to e.g. datafy-454814-5c78fcf0333a.json.
    json_key = ENV["PLAYSTORE_JSON_KEY"] || "playstore-credentials.json"
    upload_to_play_store(
      track: "internal",
      aab: "../build/app/outputs/bundle/release/app-release.aab",
      json_key: json_key,
      skip_upload_metadata: true,
      skip_upload_images: true,
      skip_upload_screenshots: true
    )
  end
end
