Skip to content

Commit 3adf913

Browse files
authored
maven connectivity parameters (#818)
CI scripts invoke gradle in a way to circumvent Azure-to-Maven connection pool timeout issues.
1 parent 783ec81 commit 3adf913

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

build_scripts/android/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ set +e
5757
# Retry the build up to 10 times, because the build fetches files from
5858
# maven and elsewhere, and occasionally the GitHub runners have
5959
# network connectivity issues that cause the download to fail.
60+
gradleparams="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false\
61+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120"
6062
for retry in {1..10} error; do
6163
if [[ $retry == "error" ]]; then exit 5; fi
62-
./gradlew assembleRelease && break
64+
./gradlew assembleRelease "${gradleparams}" && break
6365
sleep 300
6466
done
6567
set -e

scripts/gha/build_testapps.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ def _build_android(project_dir, sdk_dir):
483483
gradle_properties = os.path.join(project_dir, "gradle.properties")
484484
with open(gradle_properties, "a+") as f:
485485
f.write("systemProp.firebase_cpp_sdk.dir=" + sdk_dir + "\n")
486+
f.write("http.keepAlive=false\n")
487+
f.write("maven.wagon.http.pool=false\n")
488+
f.write("maven.wagon.httpconnectionManager.ttlSeconds=120")
486489
# This will log the versions of dependencies for debugging purposes.
487490
_run([gradlew, "dependencies", "--configuration", "debugCompileClasspath"])
488491
_run([gradlew, "assembleDebug", "--stacktrace"])

0 commit comments

Comments
 (0)