Skip to content

Commit 16cd365

Browse files
authored
use feed for robolectric, Fixes AB#3544225 (#3079)
use feed for robolectric [AB#3544225](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3544225)
1 parent 1df7e03 commit 16cd365

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

common/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ boolean newBrokerDiscoveryEnabledFlag = project.hasProperty("newBrokerDiscoveryE
9696
boolean trustDebugBrokerFlag = project.hasProperty("trustDebugBrokerFlag")
9797
boolean bypassRedirectUriCheck = project.hasProperty("bypassRedirectUriCheck")
9898

99+
def robolectricRepoUsername = System.getenv("ENV_VSTS_MVN_CRED_USERNAME") != null ? System.getenv("ENV_VSTS_MVN_CRED_USERNAME") : project.findProperty("vstsUsername")
100+
def robolectricRepoPassword = System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") != null ? System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") : project.findProperty("vstsMavenAccessToken")
101+
99102
android {
100103
compileSdk rootProject.ext.compileSdkVersion
101104
defaultConfig {
@@ -160,6 +163,11 @@ android {
160163
unitTests.all {
161164
exclude 'com/microsoft/identity/common/integration'
162165
exclude 'com/microsoft/identity/common/ropc'
166+
if (robolectricRepoUsername?.toString()?.trim() && robolectricRepoPassword?.toString()?.trim()) {
167+
it.systemProperty("robolectric.dependency.repo.url", "https://identitydivision.pkgs.visualstudio.com/_packaging/NewAndroid/maven/v1")
168+
it.systemProperty("robolectric.dependency.repo.username", robolectricRepoUsername)
169+
it.systemProperty("robolectric.dependency.repo.password", robolectricRepoPassword)
170+
}
163171
}
164172
}
165173

0 commit comments

Comments
 (0)