From ad6aa9b49d12ddd11fc3202505aa6f29483858fb Mon Sep 17 00:00:00 2001 From: Rasmus Praestholm Date: Wed, 21 Apr 2021 20:00:27 -0500 Subject: [PATCH] logistics: Replace usage of jcenter (shutting down) (#4632) --- build-logic/build.gradle.kts | 2 +- .../src/main/kotlin/terasology-repositories.gradle.kts | 6 ++---- build.gradle | 4 ---- config/groovy/common.groovy | 3 ++- templates/build.gradle | 2 -- templates/facades.gradle | 2 -- 6 files changed, 5 insertions(+), 14 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index ee21084fc..9615b406c 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } repositories { - jcenter() + mavenCentral() maven { name = "Terasology Artifactory" diff --git a/build-logic/src/main/kotlin/terasology-repositories.gradle.kts b/build-logic/src/main/kotlin/terasology-repositories.gradle.kts index 8161abeaf..7122ecb32 100644 --- a/build-logic/src/main/kotlin/terasology-repositories.gradle.kts +++ b/build-logic/src/main/kotlin/terasology-repositories.gradle.kts @@ -5,13 +5,11 @@ import java.net.URI // We use both Maven Central and our own Artifactory instance, which contains module builds, extra libs, and so on repositories { - // External libs - jcenter is Bintray and a superset of Maven Central - jcenter { + mavenCentral { content { // This is first choice for most java dependencies, but assume we'll need to check our // own repository for things from our own organization. - // (This is an optimization so gradle doesn't try to find our hundreds of modules - // in jcenter.) + // (This is an optimization so gradle doesn't try to find our hundreds of modules in 3rd party repos) excludeGroupByRegex("""org\.terasology(\..+)?""") } } diff --git a/build.gradle b/build.gradle index 6e7bff467..71018ec41 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,6 @@ // Dependencies needed for what our Gradle scripts themselves use. It cannot be included via an external Gradle file :-( buildscript { repositories { - // External libs - jcenter is Bintray and is supposed to be a superset of Maven Central, but do both just in case - jcenter() mavenCentral() gradlePluginPortal() @@ -75,8 +73,6 @@ ext { // Declare remote repositories we're interested in - library files will be fetched from here repositories { - // External libs - jcenter is Bintray and is supposed to be a superset of Maven Central, but do both just in case - jcenter() mavenCentral() // MovingBlocks Artifactory instance for libs not readily available elsewhere plus our own libs diff --git a/config/groovy/common.groovy b/config/groovy/common.groovy index b215c318d..61167b19a 100644 --- a/config/groovy/common.groovy +++ b/config/groovy/common.groovy @@ -3,7 +3,8 @@ import groovy.json.JsonSlurper @Grab(group = 'org.slf4j', module = 'slf4j-api', version = '1.6.1') @Grab(group = 'org.slf4j', module = 'slf4j-nop', version = '1.6.1') -@GrabResolver(name = 'jcenter', root = 'http://jcenter.bintray.com/') +// TODO: Temp replacement for jcenter, grgit is not in MavenCentral yet +@GrabResolver(name = 'ajoberstar-backup', root = 'https://ajoberstar.github.io/bintray-backup/') @Grab(group = 'org.ajoberstar', module = 'grgit', version = '1.9.3') import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.exception.GrgitException diff --git a/templates/build.gradle b/templates/build.gradle index 4005571bd..258072da7 100644 --- a/templates/build.gradle +++ b/templates/build.gradle @@ -4,8 +4,6 @@ // Alternatively we untangle and update the common.gradle / Kotlin Gradle plugin stuff or just remove these two buildscript { repositories { - // External libs - jcenter is Bintray and is supposed to be a superset of Maven Central, but do both just in case - jcenter() mavenCentral() maven { url = uri("https://plugins.gradle.org/m2/") diff --git a/templates/facades.gradle b/templates/facades.gradle index a7d6fe6d6..236007a9b 100644 --- a/templates/facades.gradle +++ b/templates/facades.gradle @@ -6,8 +6,6 @@ apply plugin: 'pmd' // Same repository configuration as root project repositories { - // External libs - jcenter is Bintray and is supposed to be a superset of Maven Central, but do both just in case - jcenter() mavenCentral() // MovingBlocks Artifactory instance for libs not readily available elsewhere plus our own libs