# 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
#

opt_out_usage

default_platform(:android)

platform :android do
  desc "Deploy a new version to the Google Play"
  lane :deploy do
    gradle(
        task: "clean assembleRelease",
        properties: {
            "android.injected.signing.store.file" => ENV["GROBOX_KEYSTORE_PATH"],
            "android.injected.signing.store.password" => ENV["GROBOX_KEYSTORE_PASS"],
            "android.injected.signing.key.alias" => "App Bundle Reporter",
            "android.injected.signing.key.password" => ENV["GROBOX_KEYSTORE_BUNDLE_PASS"],
        }
    )
    upload_to_play_store(
        track: 'production',
        skip_upload_images: 'true',
        skip_upload_screenshots: 'true',
        skip_upload_apk: 'true',
        validate_only: 'true'
    )
  end
end
