Fastlane: Add a lane to build + upload to playstore

In the alpha version for now. The --build-number flag fails right now,
this seems to be a regression in flutter which has been fixed, but the
new version has yet to be released.

So, when I put this into a proper CI, it's going to fail :(
This commit is contained in:
Vishesh Handa
2019-01-14 19:12:21 +01:00
parent 0dcd051028
commit 72edf6e11c

View File

@ -1,23 +1,21 @@
default_platform(:android) default_platform(:android)
platform :android do platform :android do
desc "Runs all the tests" desc "Build a new Android APK"
lane :test do lane :alphaBuild do
gradle(task: "test") # Return the number of commits in current git branch
build_number = number_of_commits()
Dir.chdir "../../" do
#sh("flutter", "packages", "get")
#sh("flutter", "clean")
#sh("flutter", "build", "apk", "--build-number=#{build_number}")
end end
desc "Submit a new Beta Build to Crashlytics Beta" upload_to_play_store(track: "alpha",
lane :beta do apk: "../build/app/outputs/apk/release/app-release.apk",
gradle(task: "clean assembleRelease") skip_upload_metadata: true,
crashlytics skip_upload_images: true,
skip_upload_screenshots: true,
# sh "your_script.sh" )
# You can also use other beta testing services here
end
desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "clean assembleRelease")
upload_to_play_store
end end
end end