From 3895ad6edc2a53bd71a594ef20361a1d73d65b2c Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sun, 29 Jan 2023 09:26:34 -0800 Subject: [PATCH] [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 ``` --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 069a5a6..18afe43 100644 --- a/build.gradle +++ b/build.gradle @@ -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 }