From 07488b2e8eeaffb9caea0f5a6a1679a10c000b25 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Mon, 19 Oct 2026 10:49:45 +0200 Subject: [PATCH 1/2] build(fastlane): disable R8 optimization for release builds Signed-off-by: alperozturk96 # Conflicts: # fastlane/Fastfile --- fastlane/Fastfile | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b1f4d9bdf1a8..1256bc8d5efb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -29,7 +29,7 @@ GRADLE_SIGNING_PROPERTIES = { import("./common.Fastfile") platform :android do - + desc "Release phase 2 for RC: checks, tag, upload gplay to playstore with values from build.gradle.kts" lane :RC_releasePhase2 do |options| checkReleaseRequirements_RC() @@ -45,7 +45,7 @@ platform :android do fdroidMergeRequest_RC(info) createChangelogPullRequest_RC(info) end - + desc "Release phase 2 for FINAL: checks, tag, upload gplay to playstore with values from build.gradle.kts" lane :Final_releasePhase2 do |options| checkReleaseRequirements_Final() @@ -76,67 +76,67 @@ platform :android do delay_before_submit_for_review: 30, ) end - - ## private lanes + + ## private lanes private_lane :checkReleaseRequirements_common do sh("if ! command -v fdroid &>/dev/null; then echo 'fdroid command not found' && exit 1; fi") sh("if ! command -v bundletool &>/dev/null; then echo 'bundletool command not found' && exit 1; fi") end - + private_lane :checkReleaseRequirements_RC do checkReleaseRequirements_common() sh("if ! command -v fdroidMergeRequestRC &>/dev/null; then echo 'fdroidMergeRequestRC command not found'; exit 1; fi") sh("if ! command -v createChangelogPullRequestRC &>/dev/null; then echo 'createChangelogPullRequestRC command not found'; exit 1; fi") end - + private_lane :checkReleaseRequirements_Final do checkReleaseRequirements_common() sh("if ! command -v fdroidMergeRequestFinal &>/dev/null; then echo 'fdroidMergeRequestFinal command not found'; exit 1; fi") sh("if ! command -v createChangelogPullRequestFinal &>/dev/null; then echo 'createChangelogPullRequestFinal command not found'; exit 1; fi") end - + private_lane :createChangelogPullRequest_RC do |options| sh("createChangelogPullRequestRC " + options["tag"] + " \"" + options["versionName"] + "\" " + options["versionCode"] + " \"" + options["branch"] + "\" ") end - + private_lane :createChangelogPullRequest_Final do |options| sh("createChangelogPullRequestFinal " + options["tag"] + " \"" + options["versionName"] + "\" " + options["versionCode"] + " \"" + options["branch"] + "\" ") end - + private_lane :checkIfAPKexists do |options| sh("if [ $(/bin/ls -1 ../release | wc -l) -ne 4 ]; then echo 'Release artifacts not present or wrong number present; aborting!' ; exit 1 ; fi") end - + desc "Show versions and prompt for confirmation" private_lane :promptVersion do |options| print "VersionCode: " + options["versionCode"].to_s + "\n" print "Name: " + options["versionName"] + "\n" print "Tag: " + options["tag"] + "\n" print "Branch: " + options["branch"] + "\n" - + answer = prompt(text: "is this okay?", boolean: true) - + if !answer exit end end - + desc "check if library is set correctly" private_lane :checkLibrary_RC do sh(" if [ $(egrep 'androidLibraryVersion.*master.*' ../build.gradle.kts -c) -eq 1 ] ; then echo 'Library is set to master tag; aborting!' ; exit 1 ; fi") end - + desc "check if library is set correctly: must NOT contain master nor rc" private_lane :checkLibrary_Final do sh(" if [ $(grep 'androidLibraryVersion' ../build.gradle.kts | egrep 'master|rc' -c) -eq 1 ] ; then echo 'Library is still set to rc tag; aborting!' ; exit 1 ; fi") end - + desc "check if screenshots exists and exit" private_lane :checkIfScreenshotsExist do sh(" if [ $(find metadata/android/*/images -type f -not -name icon.png | grep -c . ) -gt 0 ] ; then echo 'Screenshots in fastlane folder exist; aborting!' ; exit 1 ; fi") end - + private_lane :createGithubRelease_RC do |options| set_github_release( repository_name: REPO, @@ -149,7 +149,7 @@ platform :android do options["versionCode"] + ".apk" ] ) end - + private_lane :createGithubRelease_Final do |options| set_github_release( repository_name: REPO, @@ -160,15 +160,15 @@ platform :android do upload_assets: Dir.glob("release/*.apk") ) end - + private_lane :fdroidMergeRequest_RC do |options| sh("fdroidMergeRequestRC " + options["tag"] + " \"" + options["versionName"] + "\" " + options["versionCode"]) end - + private_lane :fdroidMergeRequest_Final do |options| sh("fdroidMergeRequestFinal " + options["tag"] + " \"" + options["versionName"] + "\" " + options["versionCode"]) end - + private_lane :checkChangelog do |options| sh(" if [ ! -e metadata/android/en-US/changelogs/" + options["versionCode"] + ".txt ] ; then echo 'Changelog fastlane/metadata/android/en-US/changelogs/" + options["versionCode"] + ".txt does not exist' ; exit 1 ; fi") sh(" if [ $(wc -m metadata/android/en-US/changelogs/" + options["versionCode"] + ".txt | cut -d' ' -f1) -ge 500 ] ; then echo 'Changlog more than 500 chars' ; exit 1 ; fi") @@ -181,18 +181,18 @@ platform :android do lane :screenshotsPhone do beautifyPhone() build_for_screengrab() - + screengrab( device_type: "phone", app_apk_path: APK_LOCATION, tests_apk_path: TEST_APK_LOCATION ) end - + lane :screenshotsTablet do beautifyPhone() build_for_screengrab() - + screengrab( device_type: "sevenInch", app_apk_path: APK_LOCATION, @@ -217,7 +217,7 @@ platform :android do build_type: 'Debug' ) APK_LOCATION = lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS].select{ |i| i[/00/] }[0] - + build_android_app( task: 'assemble', flavor: 'Generic', From bf09016f26173679f7b85c56c2610eef1b689e32 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Wed, 28 Oct 2026 19:25:35 +0300 Subject: [PATCH 2/2] adopt latest changes from master Signed-off-by: alperozturk96 --- fastlane/Fastfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1256bc8d5efb..2d2717ec176c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -30,6 +30,12 @@ import("./common.Fastfile") platform :android do + before_all do + gradleFile = "../app/build.gradle.kts" + content = File.read(gradleFile) + File.write(gradleFile, content.sub(/(optimization\s*\{\s*enable\s*=\s*)true/, '\\1false')) + end + desc "Release phase 2 for RC: checks, tag, upload gplay to playstore with values from build.gradle.kts" lane :RC_releasePhase2 do |options| checkReleaseRequirements_RC()