-
-
Save chukaofili/7672809053c7e5f964c0f49a02baa6e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# | |
# Uncomment the line if you want fastlane to automatically update itself | |
# update_fastlane | |
default_platform(:android) | |
platform :android do | |
before_all do |lane, options| | |
@build_type = "Debug" | |
if not options.empty? | |
@build_type = options[:release] ? "Release" : "Debug" | |
end | |
end | |
desc "Assemble Build" | |
lane :assemble_build do |options| | |
gradle(task: "assemble", build_type: @build_type) | |
end | |
desc "Assemble Test Application" | |
lane :assemble_test_application do |options| | |
gradle(task: "assemble", build_type: "#{@build_type}AndroidTest") | |
end | |
desc "Assemble Build and Test Application" | |
lane :assemble do |options| | |
assemble_build options | |
assemble_test_application options | |
end | |
desc "Run unit tests" | |
lane :unit_tests do |options| | |
gradle(task: "test", build_type: @build_type) | |
end | |
desc "Run instrumentation tests" | |
lane :instrumentation_tests do | |
automated_test_emulator_run( | |
AVD_setup_path: "fastlane/AVD_setup.json", | |
AVD_recreate_new: false, | |
AVD_clean_after: false, | |
gradle_task: "connectedDebugAndroidTest") | |
end | |
desc "Run instrumentation tests in Firebase Test Lab" | |
lane :instrumentation_tests_testlab do | |
assemble | |
run_tests_firebase_testlab( | |
project_id: "project-id", | |
model: "Nexus6P", | |
version: "27", | |
delete_firebase_files: true) | |
end | |
desc "Submit a new Beta Build to Crashlytics" | |
lane :deploy_to_crashlytics do | |
assemble_build | |
crashlytics | |
end | |
desc "Deploy a new version to the Google Play" | |
lane :deploy_to_play_store do | |
assemble_build release:true | |
upload_to_play_store | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment