Backend Associated URL's

We would like you to assist us in knowing what all url’s needs to be whitelisted for downloading gradle binaries.
We as an organisation work in enclosed internet environment where we have limited and restricted access to the internet. Hence, gradle binaries couldn’t be downloaded as on inspection it was found that the download routes to multiple url’s.
It would be more than helpful if you can guide on what all url access should be granted at our security end so that we can download the gradle binaries and continue smooth coding

To get the allowed domain names and ports, start with the URL that is the wrapper/gradle-wrapper.properties file, and do a curl request with redirects disabled, for example: curl -v --max-redirs 0 'https://services.gradle.org/distributions/gradle-7.4.1-bin.zip'. This will give you a 301 status code and a Location header. Do the same with the URL in the Location header. Repeat this as many time as necessary. Save each URL and port up to and including the URL that actually gives you the ZIP file. Those are the domains + ports that you need to whitelist.

I faced exactly the same problem, and this is how it was determined what to whitelist.

thank you @EarthCitizen for the solution on it. Will try and revert.