diff --git a/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt b/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt index d404225116..b5c7601cde 100644 --- a/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt +++ b/app/src/androidTest/kotlin/com/tangem/common/BaseTestCase.kt @@ -56,16 +56,7 @@ abstract class BaseTestCase : TestCase( hiltRule.inject() Intents.init() additionalBeforeSection() - - runBlocking { - delay(INIT_DELAY) - } - }.after { - runBlocking { - appPreferencesStore.editData { prefs -> prefs.clear() } - } - additionalAfterSection() Intents.release() } diff --git a/ci_resources/build_ci_gradle.properties b/ci_resources/build_ci_gradle.properties deleted file mode 100644 index bb0256c8c4..0000000000 --- a/ci_resources/build_ci_gradle.properties +++ /dev/null @@ -1,13 +0,0 @@ -org.gradle.jvmargs=-Xmx7g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -org.gradle.parallel=true -org.gradle.workers.max=8 -org.gradle.daemon=false -org.gradle.unsafe.configuration-cache=false -org.gradle.console=plain -org.gradle.caching=false - -android.useAndroidX=true -android.nonTransitiveRClass=false -android.aapt2FromMavenOverride=/opt/android-sdk/build-tools/34.0.0/aapt2 - -kotlin.incremental=true diff --git a/ci_resources/find-latest-release-branch.sh b/ci_resources/find-latest-release-branch.sh deleted file mode 100755 index 091cb911e9..0000000000 --- a/ci_resources/find-latest-release-branch.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -# Input args -if [ -z "$1" ]; then - echo "Error: No base branch argument provided or empty string given." - echo "Usage: $0 " - exit 1 -fi -base_branch=$1 - -# Initialize arrays to store branch-commit mapping -declare -a branches -declare -a commits - -# Source refs to find branches from -local_refs="refs/heads/releases/*" # For debug and development -#TODO remove pre_release branches matching after 5.21 release -remote_refs=$(git for-each-ref --sort=-committerdate --format="%(refname:short)" refs/remotes/origin/ | grep -E "origin/([a-zA-Z0-9._-]+_pre_release|releases/[a-zA-Z0-9._-]+)$") - -# Iterate over all remote release branches, sorted by commit date (most recent first) -index=0 -for branch in $remote_refs; do - # Find the latest commit that is an ancestor of base_branch using --first-parent strategy - candidate_commit=$(git rev-list --first-parent "$branch..$base_branch" | tail -1) - - if [ -n "$candidate_commit" ]; then - branches[$index]="$branch" - commits[$index]="$candidate_commit" - index=$((index + 1)) - fi -done - -# Debug output of branches and commits -echo "Branches and their corresponding commits:" >&2 -for i in "${!branches[@]}"; do - echo "${branches[$i]} -> ${commits[$i]}" >&2 -done - -# Find the branch with the most recent commit -latest_branch="" -latest_commit="" -for i in "${!branches[@]}"; do - branch=${branches[$i]} - commit=${commits[$i]} - if [ -z "$latest_commit" ] || [ "$(git rev-list --count $latest_commit..$commit)" -gt 0 ]; then - latest_branch=$branch - latest_commit=$commit - fi -done - -# Output validation -if [ -z "$latest_branch" ]; then - echo "Error: Can't find the latest 'release/*' branch for the base branch '$base_branch'" >&2 - exit 2 -fi - -# Stripping 'origin/' prefix if needed -latest_branch="${latest_branch#origin/}" - -echo "$latest_branch" > "find-latest-release-branch.output" -echo "Latest release branch created directly from '$base_branch' or its ancestor: '$latest_branch'" diff --git a/ci_resources/tests_ci_gradle.properties b/ci_resources/tests_ci_gradle.properties deleted file mode 100644 index 860c64d2b5..0000000000 --- a/ci_resources/tests_ci_gradle.properties +++ /dev/null @@ -1,13 +0,0 @@ -org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=512m -XX:+UseParallelGC -XX:ParallelGCThreads=3 -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -org.gradle.parallel=true -org.gradle.workers.max=3 -org.gradle.daemon=false -org.gradle.unsafe.configuration-cache=false -org.gradle.console=plain -org.gradle.caching=false - -android.useAndroidX=true -android.nonTransitiveRClass=false -android.aapt2FromMavenOverride=/opt/android-sdk/build-tools/35.0.0/aapt2 - -kotlin.incremental=false diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 24ec4eb861..0dd13a52a2 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,7 +19,7 @@ platform :android do desc "Run detekt" lane :detekt do - FileUtils.cp("../ci_resources/tests_ci_gradle.properties", "../gradle.properties") + FileUtils.cp("../tangem-android-tools/CI/gradle_properties/tests_ci_gradle.properties", "../gradle.properties") puts File.read("../gradle.properties") gradle(task: "detekt") end @@ -27,7 +27,7 @@ platform :android do desc "Run tests" lane :test do FileUtils.cp("../app/src/main/assets/tangem-app-config/android/google-services/dev/google-services.json", "../app") - FileUtils.cp("../ci_resources/tests_ci_gradle.properties", "../gradle.properties") + FileUtils.cp("../tangem-android-tools/CI/gradle_properties/tests_ci_gradle.properties", "../gradle.properties") puts File.read("../gradle.properties") gradle(task: "testDebugUnitTest") end @@ -36,7 +36,7 @@ platform :android do desc "Build release AAB and APK" lane :buildRelease do |options| FileUtils.cp("../app/src/main/assets/tangem-app-config/android/google-services/release/google-services.json", "../app") - FileUtils.cp("../ci_resources/build_ci_gradle.properties", "../gradle.properties") + FileUtils.cp("../tangem-android-tools/CI/gradle_properties/build_ci_gradle.properties", "../gradle.properties") puts File.read("../gradle.properties") gradle( @@ -69,7 +69,7 @@ platform :android do desc "Build internal APK Firebase App Distribution" lane :buildInternal do |options| FileUtils.cp("../app/src/main/assets/tangem-app-config/android/google-services/dev/google-services.json", "../app") - FileUtils.cp("../ci_resources/build_ci_gradle.properties", "../gradle.properties") + FileUtils.cp("../tangem-android-tools/CI/gradle_properties/build_ci_gradle.properties", "../gradle.properties") puts File.read("../gradle.properties") gradle( diff --git a/tangem-android-tools b/tangem-android-tools index 8d971eb9d9..034ad04fdf 160000 --- a/tangem-android-tools +++ b/tangem-android-tools @@ -1 +1 @@ -Subproject commit 8d971eb9d901358419da78408ecf7dc3f0c4331f +Subproject commit 034ad04fdf0810e338cb8898f50554874cec96d7