You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val connection =URL(testUrl).openConnection() asHttpURLConnection
25
24
connection.requestMethod ="GET"
@@ -40,8 +39,10 @@ fun checkMavenCentralAccessibility(): Boolean {
40
39
return accessible
41
40
}
42
41
43
-
val isMavenAccessible = checkMavenCentralAccessibility()
44
-
val mavenCentralMirrorUrl ="https://maven-central.storage-download.googleapis.com/maven2/"
42
+
val mavenCentralTestUrl = providers.gradleProperty("mavenCentralTestUrl").getOrElse("https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom")
43
+
val mavenCentralMirrorUrl = providers.gradleProperty("mavenCentralMirrorUrl").getOrElse("https://maven-central.storage-download.googleapis.com/maven2/")
44
+
45
+
val isMavenAccessible = checkMavenCentralAccessibility(mavenCentralTestUrl)
45
46
46
47
// Plugins for configuring _this build_ of the module
val mavenCentralTestUrl = settings.providers.gradleProperty("mavenCentralTestUrl").getOrElse("https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom")
22
+
val mavenCentralMirrorUrl = settings.providers.gradleProperty("mavenCentralMirrorUrl").getOrElse("https://maven-central.storage-download.googleapis.com/maven2/")
23
+
21
24
val isMavenAccessible =try {
22
-
val connection = java.net.URL("https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom").openConnection() as java.net.HttpURLConnection
25
+
val connection = java.net.URL(mavenCentralTestUrl).openConnection() as java.net.HttpURLConnection
0 commit comments