Skip to content

Commit 42d48ed

Browse files
committed
Gate plugin feed resolution on token; fall back to portal without it
1 parent 249dcba commit 42d48ed

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎settings.gradle‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
pluginManagement {
2-
// Resolve plugins through the Azure Artifacts feed only.
2+
// Resolve plugins from the Azure Artifacts feed when its token is available; otherwise the public portal.
33
def azfuncFeedToken = System.getenv('AZURE_ARTIFACTS_ENV_ACCESS_TOKEN') ?: providers.gradleProperty('vstsMavenAccessToken').orNull
44
repositories {
5-
maven {
6-
url 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/maven/v1'
7-
if (azfuncFeedToken) {
5+
if (azfuncFeedToken) {
6+
maven {
7+
url 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/maven/v1'
88
credentials {
99
username 'Azure DevOps Services'
1010
password azfuncFeedToken
1111
}
1212
}
13+
} else {
14+
gradlePluginPortal()
1315
}
1416
}
1517
}

0 commit comments

Comments
 (0)