浏览代码

allprojects uses artifactoryUsername/Password

Rob Winch 4 年之前
父节点
当前提交
05c0176b98
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      build.gradle

+ 16 - 0
build.gradle

@@ -43,3 +43,19 @@ subprojects {
 		options.encoding = "UTF-8"
 	}
 }
+
+if (project.hasProperty('artifactoryUsername') {
+	allprojects { project ->
+		project.repositories { repos ->
+			all { repo ->
+				if (!repo.url.toString().startsWith("https://repo.spring.io/")) {
+					return;
+				}
+				repo.credentials {
+					username = artifactoryUsername
+					password = artifactoryPassword
+				}
+			}
+		}
+	}
+}