# This file contains the fastlane.tools configuration for Android # 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 require 'json' default_platform(:android) version_code = 1 playstore_track = "internal" package_json = JSON.parse(File.read('../../package.json')) platform :android do desc "Runs all the tests" lane :test do gradle(task: "test") end lane :fetch_version_code do version_code = google_play_track_version_codes( package_name: ENV['ANDROID_PACKAGE_NAME'], track: playstore_track, json_key: '../../playstore_api_key.json' ).max end lane :build do gradle( task: "clean assemble", build_type: "Release", print_command: false, properties: { "android.injected.signing.store.file" => "../../../playstore.keystore", "android.injected.signing.store.password" => "", "android.injected.signing.key.alias" => "", "android.injected.signing.key.password" => "", "versionCode" => version_code, "versionName" => package_json['version'] } ) end desc "Submit a new beta build to internal testing track" lane :beta do playstore_track = "internal" build upload_to_play_store( track: playstore_track, json_key: '../../playstore_api_key.json', skip_upload_metadata: true, skip_upload_images: true, skip_upload_screenshots: true ) end desc "Deploy a new version to the Google Play" lane :release do build #upload_to_play_store(json_key: '../../playstore_api_key.json', skip_upload_metadata: true, skip_upload_images: true) end end