Select Git revision
Fastfile 2.22 KiB
# 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
# get the required prerequisites like credentials, app ids etc.
before_all do
ENV["FIREBASE_LOGIN_CREDENTIALS"] = "fastlane/fastlane-admin-app-distribution.json"
ENV["FIREBASE_APP_ID"] = "1:771295755070:android:5007592bd3aba1c3ec0a6f"
end
######## Generate the Apk and App bundle ########
desc "build the apk or bundle"
lane :build do
gradle(task: "clean assembleDebug") # generates debug build
gradle(task: "bundleRelease") # generates signed release bundle
end
######## Upload apk to Firebase Distribution Channel ########
desc "Upload build to Firebase App Distribution"
lane :distributeViaFirebase do |options|
#gradle(task: "clean assembleDebug")
apk_path = "app/build/outputs/apk/debug/app-debug.apk"
firebase_app_distribution(
app: ENV["FIREBASE_APP_ID"],
apk_path: apk_path,
release_notes: "Release notes",
groups_file: "fastlane/groups.txt",
service_credentials_file: ENV["FIREBASE_LOGIN_CREDENTIALS"]
)
end
######## Upload app bundle to Google Playstore Alpha Track ########
desc "Deploy a new version to the Google Play Store - Alpha Track"
lane :deployToPlaystoreAlpha do
upload_to_play_store(
track: "alpha", # alpha or beta or internal or production
json_key: "/home/karthik_shetty_niveussolutions_c/prj-common-services-01-0c9b948542c2.json",
package_name: "com.kp.testapp",
aab: "app/build/outputs/bundle/release/app-release.aab",
skip_upload_metadata: true, # Set to false if you want to upload metadata (e.g., changelog)
skip_upload_images: true, # Set to false if you want to upload screenshots, feature graphics, etc.
skip_upload_apk: true # Set to true if opting for App Bundle
)
end
end