Skip to content

Commit 8b429fd

Browse files
committed
Prevent http:// protocol repositories
1 parent a64aa5e commit 8b429fd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,14 @@ task test(dependsOn: getTasksByName("test", true)) {
307307
report(todir: testReportsDir)
308308
}
309309
}
310-
}
310+
}
311+
312+
project.afterEvaluate {
313+
allprojects.repositories.each { handler ->
314+
handler.each {
315+
if (it.url.toString().startsWith("http://")) {
316+
throw new RuntimeException("Build should not define insecure HTTP-based Maven repostories")
317+
}
318+
}
319+
}
320+
}

0 commit comments

Comments
 (0)