From 25a7100d29140c3e4b6698259ffea1bff4c61149 Mon Sep 17 00:00:00 2001 From: Matt Matravers Date: Thu, 31 Mar 2022 10:08:56 +0100 Subject: [PATCH] Allow custom Node distBaseUrl --- datahub-web-react/build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/datahub-web-react/build.gradle b/datahub-web-react/build.gradle index 28835b89c685e5..28714fc4c9ecb7 100644 --- a/datahub-web-react/build.gradle +++ b/datahub-web-react/build.gradle @@ -18,8 +18,12 @@ node { // Version of Yarn to use. yarnVersion = '1.22.0' - // Base URL for fetching node distributions (change if you have a mirror). - distBaseUrl = 'https://nodejs.org/dist' + // Base URL for fetching node distributions (set nodeDistBaseUrl if you have a mirror). + if (project.hasProperty('nodeDistBaseUrl')) { + distBaseUrl = project.getProperty('nodeDistBaseUrl') + } else { + distBaseUrl = 'https://nodejs.org/dist' + } // Set the work directory for unpacking node workDir = file("${project.projectDir}/.gradle/nodejs")