Slackbot
04/20/2023, 12:31 AMgrossws
04/20/2023, 12:40 AMrepositories { removeIf { .. } ; maven { .. } }grossws
04/20/2023, 12:42 AMgrossws
04/20/2023, 12:42 AMgrossws
04/20/2023, 12:43 AMgrossws
04/20/2023, 12:43 AM<http://repo.maven.apache.org|repo.maven.apache.org>. 83713 IN CNAME repo.apache.maven.org.
from 1.1.1.1grossws
04/20/2023, 12:43 AMephemient
04/20/2023, 12:49 AM*.<http://apache.org|apache.org>. → *.<http://maven.org|maven.org>), but then <http://repo.apache.maven.org|repo.apache.maven.org> is answered authoritatively without an A or AAAA recordgrossws
04/20/2023, 12:49 AMfluxo [3:34 AM]
np. i pinged sonatype on the ticket
grossws
04/20/2023, 12:50 AM<http://maven.org|maven.org> is under Sonatype controlgrossws
04/20/2023, 12:50 AMgrossws
04/20/2023, 12:52 AM<http://central.sonatype.com|central.sonatype.com>, now they broke Central itselfgrossws
04/20/2023, 12:53 AMwell the CNAME itself isn't necessarily an issue (*.apache.org. → *.maven.org), but then repo.apache.maven.org is answered authoritatively without an A or AAAA recordit's so similar that I first thought that it was cname to itself 😁
grossws
04/20/2023, 12:56 AMpluginManagement unfortunatelyephemient
04/20/2023, 12:58 AMval fixupMavenCentralUrl = Action<MavenArtifactRepository> {
if (url.host.equals("<http://repo.maven.apache.org|repo.maven.apache.org>", ignoreCase = true)) {
url = uri(url.toString().replace("<http://repo.maven.apache.org|repo.maven.apache.org>", "<http://repo1.maven.org|repo1.maven.org>", ignoreCase = true))
}
}
beforeSettings {
buildscript.repositories.withType(MavenArtifactRepository::class, fixupMavenCentralUrl)
pluginManagement.repositories.withType(MavenArtifactRepository::class, fixupMavenCentralUrl)
}
beforeProject {
buildscript.repositories.withType(MavenArtifactRepository::class, fixupMavenCentralUrl)
repositories.withType(MavenArtifactRepository::class, fixupMavenCentralUrl)
}
which fixed my primary build but doesn't seem to apply to included buildsgrossws
04/20/2023, 1:01 AMSettings#pluginManagement#repositories, Settings#dependencyResolutionManagement#repositories and Project#repositories, so you'll have to apply the fix for each included buildephemient
04/20/2023, 1:02 AM~/.gradle/init.d/fixupMavenCentralUrl.init.gradle.kts and it only applied to the top-level build, not included builds. if there's a non-invasive way to do that, I haven't found itgrossws
04/20/2023, 1:12 AMgrossws
04/20/2023, 1:20 AMgradle.beforeSetting { it.dependencyResolutionManagement { .. } } that was somehow applied to both root build and included build (since i had a clause that added gradlePluginPortal() to build-logic. IIRC it was mostly on Gradle 7.x at the time I wrote itephemient
04/20/2023, 1:22 AMgrossws
04/20/2023, 1:22 AMsettings.gradle.kts (when it resolves included builds) and then to both main settings and one from build-logicgrossws
04/20/2023, 1:29 AMdependencyResolutionManagement.repositories.withType(MavenArtifactRepository::class, fixupMavenCentralUrl) to beforeSettings if some project use it instead of declaring repos in build.gradle[.kts]grossws
04/20/2023, 3:34 AMVampire
04/20/2023, 8:12 AM--init-script, but only on buildSrc. Included builds should even work then.