diff --git a/build_scripts/android/build.sh b/build_scripts/android/build.sh index f351a0348f..f2373e3ea9 100755 --- a/build_scripts/android/build.sh +++ b/build_scripts/android/build.sh @@ -57,9 +57,11 @@ set +e # Retry the build up to 10 times, because the build fetches files from # maven and elsewhere, and occasionally the GitHub runners have # network connectivity issues that cause the download to fail. +gradleparams="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false\ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=120" for retry in {1..10} error; do if [[ $retry == "error" ]]; then exit 5; fi - ./gradlew assembleRelease && break + ./gradlew assembleRelease "${gradleparams}" && break sleep 300 done set -e diff --git a/scripts/gha/build_testapps.py b/scripts/gha/build_testapps.py index 25b28c1cf8..49916026bf 100644 --- a/scripts/gha/build_testapps.py +++ b/scripts/gha/build_testapps.py @@ -483,6 +483,9 @@ def _build_android(project_dir, sdk_dir): gradle_properties = os.path.join(project_dir, "gradle.properties") with open(gradle_properties, "a+") as f: f.write("systemProp.firebase_cpp_sdk.dir=" + sdk_dir + "\n") + f.write("http.keepAlive=false\n") + f.write("maven.wagon.http.pool=false\n") + f.write("maven.wagon.httpconnectionManager.ttlSeconds=120") # This will log the versions of dependencies for debugging purposes. _run([gradlew, "dependencies", "--configuration", "debugCompileClasspath"]) _run([gradlew, "assembleDebug", "--stacktrace"])