[ci skip] Fix handling of repos without a URL

Fixes building OC
```
FAILURE: Build failed with an exception.

* Where:
Build file '/tmp/org-build-system-update/repositories/OpenComputers/build.gradle' line: 395

* What went wrong:
A problem occurred evaluating script.
> Cannot invoke method getScheme() on null object

```
This commit is contained in:
Jason Mitchell authored and GitHub committed 2023-01-29 09:26:34 -08:00
1 parent a55df1f5fb
commit 3895ad6edc
1 file changed
+2 -2
+2 -2
View File
@@ -1,4 +1,4 @@
//version: 1674988119
//version: 1675013090
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -392,7 +392,7 @@ if (file('addon.gradle').exists()) {
// Allow unsafe repos but warn
repositories.configureEach { repo ->
if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) {
if (repo.getUrl().getScheme() == "http" && !repo.allowInsecureProtocol) {
if (repo.getUrl() != null && repo.getUrl().getScheme() == "http" && !repo.allowInsecureProtocol) {
logger.warn("Deprecated: Allowing insecure connections for repo '${repo.name}' - add 'allowInsecureProtocol = true'")
repo.allowInsecureProtocol = true
}