Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup correctly gradle version for large test #102

Merged
merged 1 commit into from
Mar 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,20 @@ export TARGET_SDK_VERSION="$android_api"
export NDK_VERSION="21.0.6113669"
jenv global 11

exec_test() {
cd "$1"

setup_gradle_version() {
if grep -q "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties; then
file="./gradle/wrapper/gradle-wrapper.properties"
tail -n 1 "$file" | wc -c | xargs -I {} truncate "$file" -s -{}
fi

echo "distributionUrl=https\://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip" >> ./gradle/wrapper/gradle-wrapper.properties
}

exec_test() {
cd "$1"

setup_gradle_version

gem install bundler:2.3.7
bundle install
bundle exec fastlane android build
Expand All @@ -94,6 +99,8 @@ fi
if [ "$large_test" = true ]; then
echo "Run android tests on Firebase Test Lab"
cd "$script_path"/test-firebase-test-lab

setup_gradle_version

bundle install
bundle exec fastlane android integrated_test
Expand Down