From 28c95d983c625a1f614d389b30bd1fb87f2bdf03 Mon Sep 17 00:00:00 2001 From: Alexey Kuznetsov Date: Fri, 14 Aug 2026 09:50:54 -0400 Subject: [PATCH] Route Robolectric downloads through repository proxy --- .../resources/test-succeed-robolectric/build.gradleTest | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dd-smoke-tests/gradle/src/test/resources/test-succeed-robolectric/build.gradleTest b/dd-smoke-tests/gradle/src/test/resources/test-succeed-robolectric/build.gradleTest index 618780014b1..566eba49ada 100644 --- a/dd-smoke-tests/gradle/src/test/resources/test-succeed-robolectric/build.gradleTest +++ b/dd-smoke-tests/gradle/src/test/resources/test-succeed-robolectric/build.gradleTest @@ -13,10 +13,11 @@ apply plugin: 'java' // the 'com.android.base' plugin id, so applying an id-only stand-in exercises it. apply plugin: 'com.android.base' +def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY") + repositories { mavenLocal() - def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY") if (proxyUrl) { println "Using proxy repository: $proxyUrl" maven { @@ -106,6 +107,10 @@ dependencies { test { useJUnit() + if (proxyUrl) { + // Robolectric resolves the Android SDK at test runtime, outside Gradle's dependency resolver. + systemProperty "robolectric.dependency.repo.url", proxyUrl + } // Coverage is validated by the other Gradle smoke scenarios; disable it here so this scenario // stays focused on the emulated-SDK (test.android.*) tags. environment "DD_CIVISIBILITY_CODE_COVERAGE_ENABLED", "false"