From 958f8d97b0148fd6db76b49f6377cf31cbb5e6c3 Mon Sep 17 00:00:00 2001 From: hmalik144 Date: Thu, 30 Mar 2023 23:16:14 +0100 Subject: [PATCH] - updated config.yml - Fastlane added - lanes added for upload to playstore Took 3 hours 34 minutes --- .circleci/config.yml | 5 ++-- .gitignore | 4 ++++ Gemfile | 3 +++ app/build.gradle | 10 ++++---- fastlane/Fastfile | 44 ++++++++++++++++++++++++++++++++++ fastlane/README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++ fastlane/report.xml | 25 ++++++++++++++++++++ 7 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 Gemfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/README.md create mode 100644 fastlane/report.xml diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d82d27..cb0a349 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,9 +90,10 @@ jobs: echo "$GOOGLE_PLAY_KEY" > "android/playstore.json" # And finally run the release build - run: - name: Assemble release build + name: Assemble and Upload to PlayStore command: | - ./gradlew assembleDriverRelease + pwd + bundle exec fastlane deploy<< parameters.flavour >> # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: diff --git a/.gitignore b/.gitignore index 0fc0baf..c9415c3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ .externalNativeBuild *.log local +/.circleci/local_config.yml +/.circleci/run_local.bash +/Gemfile.lock +/playstore.json diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..7a118b4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" diff --git a/app/build.gradle b/app/build.gradle index db9d346..3a158b9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "h_mal.appttude.com.driver" minSdkVersion 24 targetSdkVersion 31 - versionCode 6 - versionName "1.6" + versionCode 7 + versionName "2.0.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' boolean state = project.rootProject.file('local.properties').canRead() @@ -41,7 +41,7 @@ android { storePassword relStorePassword keyPassword relKeyPassword keyAlias relKeyAlias -// storeFile file(relStoreFile) + storeFile file(relStoreFile) } } @@ -66,8 +66,8 @@ android { flavorDimensions "Default" productFlavors { driver { - versionCode 6 - versionName "1.0.5" + versionCode 7 + versionName "2.0.0" } admin { applicationIdSuffix ".admin" diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 0000000..a82c0c4 --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,44 @@ +# 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 + desc "Runs all the tests" + lane :test do + gradle(task: "test") + end + + desc "Submit a new Beta Build to Crashlytics Beta" + lane :beta do + gradle(task: "clean assembleRelease") + crashlytics + + # sh "your_script.sh" + # You can also use other beta testing services here + end + + desc "Deploy a new version of Driver to the Google Play" + lane :deployDriver do + gradle(task: "clean assemble", flavor: "driver", build_type: "Release") + upload_to_play_store(apk: "app/build/outputs/apk/driver/release/app-driver-release.apk", json_key: "playstore.json", package_name: "h_mal.appttude.com.driver") + end + + desc "Deploy a new version of Admin to the Google Play" + lane :deployDriver do + gradle(task: "clean assemble", flavor: "admin", build_type: "Release") + upload_to_play_store(apk: "app/build/outputs/apk/admin/release/app-admin-release.apk", json_key: "playstore.json", package_name: "h_mal.appttude.com.driver.admin") + end +end diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 0000000..a5b6534 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,56 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android test + +```sh +[bundle exec] fastlane android test +``` + +Runs all the tests + +### android beta + +```sh +[bundle exec] fastlane android beta +``` + +Submit a new Beta Build to Crashlytics Beta + +### android deployDriver + +```sh +[bundle exec] fastlane android deployDriver +``` + +Deploy a new version of Driver to the Google Play + +### android deployAdmin + +```sh +[bundle exec] fastlane android deployAdmin +``` + +Deploy a new version of Admin to the Google Play + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/fastlane/report.xml b/fastlane/report.xml new file mode 100644 index 0000000..42525bd --- /dev/null +++ b/fastlane/report.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + +