# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do
  desc "Deploy a new version to Google Play"
  lane :deploy do
    #version = flutter_version()
    upload_to_play_store(
      track: 'production', # Can be 'internal', 'alpha', 'beta', 'production'
      json_key: 'google_service_account.json',
      skip_upload_apk: true,
      validate_only: false,
      skip_upload_metadata: true, # Skip uploading metadata
      skip_upload_images: true, # Skip uploading screenshots
      skip_upload_screenshots: true, # Skip uploading screenshots
      release_status: "draft", # Can be 'draft', 'completed', 'halted'
      aab: '../build/app/outputs/bundle/release/app-release.aab', # Path to your AAB file
      #version_code: version["version_code"], # From pubspec.yaml
      #version_name: version["version_name"] + version["version_code"],
    )
  end
end
