Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-25 12:26:24 +03:00
parent 64626bbcbc
commit 0ff4768da9
6 changed files with 5 additions and 103 deletions

View file

@ -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()
}

View file

@ -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

View file

@ -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 <base-branch>"
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'"

View file

@ -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

View file

@ -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(

@ -1 +1 @@
Subproject commit 8d971eb9d901358419da78408ecf7dc3f0c4331f
Subproject commit 034ad04fdf0810e338cb8898f50554874cec96d7