From 256bf71832d266da62fdf8b3143308da00e7459b Mon Sep 17 00:00:00 2001 From: cyberta Date: Sun, 1 Jan 2023 23:41:59 +0100 Subject: add fastline basics --- fastlane/Appfile | 2 ++ fastlane/Fastfile | 38 ++++++++++++++++++++++++++++++++++++++ fastlane/README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ fastlane/report.xml | 20 ++++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/README.md create mode 100644 fastlane/report.xml (limited to 'fastlane') diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 00000000..97be5207 --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one +package_name("se.leap.bitmaskclient") # e.g. com.krausefx.app diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 00000000..19c557cc --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,38 @@ +# 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 to the Google Play" + lane :deploy do + gradle(task: "clean assembleRelease") + upload_to_play_store + end +end diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 00000000..7ec1207f --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,48 @@ +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 deploy + +```sh +[bundle exec] fastlane android deploy +``` + +Deploy a new version 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 00000000..071e9c62 --- /dev/null +++ b/fastlane/report.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From e201e92acf17e3a71e2bffb73419fdd3726b0569 Mon Sep 17 00:00:00 2001 From: cyberta Date: Mon, 2 Jan 2023 21:08:29 +0100 Subject: simple example setup for fastlane, doing some screenshots in different languages, including screenshots with phone frames for use in an app store --- fastlane/Fastfile | 6 ++++++ fastlane/README.md | 8 ++++++++ fastlane/Screengrabfile | 20 ++++++++++++++++++++ fastlane/report.xml | 20 -------------------- 4 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 fastlane/Screengrabfile delete mode 100644 fastlane/report.xml (limited to 'fastlane') diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 19c557cc..d985984d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,6 +21,12 @@ platform :android do gradle(task: "test") end + lane :screenshots do + capture_android_screenshots + frameit(white: true) + # deliver + end + desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do gradle(task: "clean assembleRelease") diff --git a/fastlane/README.md b/fastlane/README.md index 7ec1207f..96002ac1 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -23,6 +23,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do Runs all the tests +### android screenshots + +```sh +[bundle exec] fastlane android screenshots +``` + + + ### android beta ```sh diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile new file mode 100644 index 00000000..4c46de1a --- /dev/null +++ b/fastlane/Screengrabfile @@ -0,0 +1,20 @@ +# remove the leading '#' to uncomment lines + +# app_package_name('your.app.package') +# use_tests_in_packages(['your.screenshot.tests.package']) + +app_apk_path('app/build/outputs/apk/normalProductionFat/debug/Bitmask_debug.apk') +# tests_apk_path('app/build/intermediates/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk') + +# all locales +# locales(['ar', 'az', 'bg', 'bn', 'br', 'ca', 'cs', 'de', 'el', 'es', 'es-AR', 'et', 'eu', 'fa-IR', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'no', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']) +# prioritized locales +# locales(['ar', 'bn', 'de', 'es', 'fa-IR', 'fr', 'he', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'pt-BR', 'pt-PT', 'ru', 'tr', 'ug', 'uk', 'zh-CN', 'zh-TW']) +# development locales +locales(['ar', 'de', 'ru']) + +# clear all previously generated screenshots in your local output directory before creating new ones +clear_previous_screenshots(true) + +# For more information about all available options run +# fastlane screengrab --help diff --git a/fastlane/report.xml b/fastlane/report.xml deleted file mode 100644 index 071e9c62..00000000 --- a/fastlane/report.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From 108b886f43feeb861807deddfcb1ab241330e242 Mon Sep 17 00:00:00 2001 From: cyberta Date: Thu, 19 Jan 2023 18:47:14 +0100 Subject: improve screenshot tests, run in different languages, test more Fragments/Activities --- fastlane/Screengrabfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fastlane') diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile index 4c46de1a..8a149163 100644 --- a/fastlane/Screengrabfile +++ b/fastlane/Screengrabfile @@ -1,10 +1,10 @@ # remove the leading '#' to uncomment lines # app_package_name('your.app.package') -# use_tests_in_packages(['your.screenshot.tests.package']) +use_tests_in_packages(['se.leap.bitmaskclient.suite']) -app_apk_path('app/build/outputs/apk/normalProductionFat/debug/Bitmask_debug.apk') -# tests_apk_path('app/build/intermediates/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk') +app_apk_path('app/build/intermediates/apk/normalProductionFat/debug/Bitmask_debug.apk') +tests_apk_path('app/build/intermediates/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk') # all locales # locales(['ar', 'az', 'bg', 'bn', 'br', 'ca', 'cs', 'de', 'el', 'es', 'es-AR', 'et', 'eu', 'fa-IR', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'no', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']) -- cgit v1.2.3 From 7d0a1f8d8057faa74035de0cee262a46c6fbbe00 Mon Sep 17 00:00:00 2001 From: cyberta Date: Mon, 23 Jan 2023 19:47:56 +0100 Subject: setup fastlane to create screenshots for Bitmask and custom branded clients, refactor Tests accordingly and create a script and environment variables to run fastlane screenshotting without thinking --- fastlane/.env.custom | 3 +++ fastlane/.env.default | 3 +++ fastlane/Fastfile | 46 +++++++++++++++++++++++++++++++++++++++++++++- fastlane/README.md | 28 ++++++++++++++++++++++++++-- fastlane/Screengrabfile | 4 ---- 5 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 fastlane/.env.custom create mode 100644 fastlane/.env.default (limited to 'fastlane') diff --git a/fastlane/.env.custom b/fastlane/.env.custom new file mode 100644 index 00000000..9b65f5d4 --- /dev/null +++ b/fastlane/.env.custom @@ -0,0 +1,3 @@ +SCREENGRAB_APP_PACKAGE_NAME="se.leap.riseupvpn" +SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/customProductionFat/debug/RiseupVPN_debug.apk" +SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/customProductionFat/debug/app-custom-production-fat-debug-androidTest.apk" diff --git a/fastlane/.env.default b/fastlane/.env.default new file mode 100644 index 00000000..bdb771ce --- /dev/null +++ b/fastlane/.env.default @@ -0,0 +1,3 @@ +SCREENGRAB_APP_PACKAGE_NAME="se.leap.bitmaskclient" +SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/normalProductionFat/debug/Bitmask_debug.apk" +SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d985984d..a0e25930 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,12 +21,56 @@ platform :android do gradle(task: "test") end - lane :screenshots do + desc "Build debug and test APK for screenshots" + lane :build_bitmask_for_screengrab do + gradle( + task: 'clean' + ) + gradle( + task: 'assemble', + build_type: 'Debug', + flavor: 'NormalProductionFat' + ) + gradle( + task: 'assemble', + build_type: 'DebugAndroidTest', + flavor: 'NormalProductionFat' + ) + end + + desc "Build debug and test APK for screenshots" + lane :build_custom_for_screengrab do + gradle( + task: 'clean' + ) + gradle( + task: 'assemble', + build_type: 'Debug', + flavor: 'CustomProductionFat' + ) + gradle( + task: 'assemble', + build_type: 'DebugAndroidTest', + flavor: 'CustomProductionFat' + ) + end + + lane :bitmask_screenshots do + # Prepare builds for Automatic UI Tests + build_bitmask_for_screengrab capture_android_screenshots frameit(white: true) # deliver end + lane :custom_build_screenshots do + # Prepare builds for Automatic UI Tests + build_custom_for_screengrab + capture_android_screenshots + frameit(white: true) + # deliver + end + desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do gradle(task: "clean assembleRelease") diff --git a/fastlane/README.md b/fastlane/README.md index 96002ac1..a41fc4c9 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -23,10 +23,34 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do Runs all the tests -### android screenshots +### android build_bitmask_for_screengrab ```sh -[bundle exec] fastlane android screenshots +[bundle exec] fastlane android build_bitmask_for_screengrab +``` + +Build debug and test APK for screenshots + +### android build_custom_for_screengrab + +```sh +[bundle exec] fastlane android build_custom_for_screengrab +``` + +Build debug and test APK for screenshots + +### android bitmask_screenshots + +```sh +[bundle exec] fastlane android bitmask_screenshots +``` + + + +### android custom_build_screenshots + +```sh +[bundle exec] fastlane android custom_build_screenshots ``` diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile index 8a149163..8534db2a 100644 --- a/fastlane/Screengrabfile +++ b/fastlane/Screengrabfile @@ -1,11 +1,7 @@ # remove the leading '#' to uncomment lines -# app_package_name('your.app.package') use_tests_in_packages(['se.leap.bitmaskclient.suite']) -app_apk_path('app/build/intermediates/apk/normalProductionFat/debug/Bitmask_debug.apk') -tests_apk_path('app/build/intermediates/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk') - # all locales # locales(['ar', 'az', 'bg', 'bn', 'br', 'ca', 'cs', 'de', 'el', 'es', 'es-AR', 'et', 'eu', 'fa-IR', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'no', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']) # prioritized locales -- cgit v1.2.3 From 2ce81f736c15a431de9c95059f84dea72c9e2556 Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 24 Jan 2023 01:01:02 +0100 Subject: specify input directory for frameit (framed images) --- fastlane/.env.custom | 1 + fastlane/.env.default | 1 + fastlane/Fastfile | 15 +++++++++++++-- fastlane/Screengrabfile | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) (limited to 'fastlane') diff --git a/fastlane/.env.custom b/fastlane/.env.custom index 9b65f5d4..5ec9ffd0 100644 --- a/fastlane/.env.custom +++ b/fastlane/.env.custom @@ -1,3 +1,4 @@ SCREENGRAB_APP_PACKAGE_NAME="se.leap.riseupvpn" SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/customProductionFat/debug/RiseupVPN_debug.apk" SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/customProductionFat/debug/app-custom-production-fat-debug-androidTest.apk" +SCREENGRAB_OUTPUT_DIRECTORY="src/custom/fastlane/metadata/android" \ No newline at end of file diff --git a/fastlane/.env.default b/fastlane/.env.default index bdb771ce..1362c5f1 100644 --- a/fastlane/.env.default +++ b/fastlane/.env.default @@ -1,3 +1,4 @@ SCREENGRAB_APP_PACKAGE_NAME="se.leap.bitmaskclient" SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/normalProductionFat/debug/Bitmask_debug.apk" SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk" +SCREENGRAB_OUTPUT_DIRECTORY="src/normal/fastlane/metadata/android" \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a0e25930..99d540ed 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -59,7 +59,12 @@ platform :android do # Prepare builds for Automatic UI Tests build_bitmask_for_screengrab capture_android_screenshots - frameit(white: true) + Dir.chdir("../src/normal/fastlane/metadata") do + frameit( + white: true, + path: "." + ) + end # deliver end @@ -67,7 +72,13 @@ platform :android do # Prepare builds for Automatic UI Tests build_custom_for_screengrab capture_android_screenshots - frameit(white: true) + Dir.chdir("../src/custom/fastlane/metadata") do + frameit( + white: true, + path: "." + ) + end + # deliver end diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile index 8534db2a..317583b0 100644 --- a/fastlane/Screengrabfile +++ b/fastlane/Screengrabfile @@ -1,6 +1,7 @@ # remove the leading '#' to uncomment lines use_tests_in_packages(['se.leap.bitmaskclient.suite']) +use_timestamp_suffix(false) # all locales # locales(['ar', 'az', 'bg', 'bn', 'br', 'ca', 'cs', 'de', 'el', 'es', 'es-AR', 'et', 'eu', 'fa-IR', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'no', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']) -- cgit v1.2.3