default_platform(:android) before_all do if is_ci skip_docs end end platform :android do ### ### Development Lanes ### desc "Runs unit tests" lane :test do gradle(task: "test") end desc "Test bundletool action" lane :test_bundletool do result = bundletool(arguments: ["version"]) UI.message("bundletool output: #{result}") end ### ### Release Lanes ### desc "Build artifacts" lane :build do |options| build_info = build_artifacts( build_type: options[:build_type], build_flavor: options[:build_flavor], pr_number: options[:pr_number] ) FastlaneCore::PrintTable.print_values( title: "Build Info", config: build_info ) build_info.each do |key, value| Github.save_output(key: key.to_s, value: value.to_s) end if !!options[:install] install_artifact(apk_path: build_info[:apk_path]) end end desc "Distribute artifacts" lane :distribute do |options| install_url = distribute_artifacts( channel: options[:channel], artifact_path: options[:artifact_path], workflow_path: options[:workflow_path], workflow_branch: options[:workflow_branch], firebase_group: options[:firebase_group], firebase_testers: options[:firebase_testers], playstore_track: options[:playstore_track] ) unless install_url.nil? || install_url.empty? UI.success("Install URL: #{install_url}") Github.save_output(key: "install_url", value: install_url) end end ### ### Misc Helper Lanes ### desc "Sync translations from Lokalise" lane :sync_translations do |options| UI.message("Pulling translations from Lokalise...") result = pull_lokalise( project_id: "60085907680fcbaa5c0259.17901376", translations_path: "common-res/src/main/res", file_format: "xml", base_lang: "en", additional_params: "--indentation=4sp" ) if result[:has_changes] UI.success("✅ Translations updated successfully") else UI.message("No translation updates available") end end end