Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In 2021, best replacement for "jcenter()"?

Android experts,

Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.

In practice today, what should I replace "jcenter" with in the below?

Unfortunately all information on this seems to have changed drastically the last year or two? Hence asking the experts here.

App is 24+ only if it matters.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.0-beta06'
    }
}
allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}
like image 837
Fattie Avatar asked Feb 03 '23 14:02

Fattie


1 Answers

I guess the current recommendation is, to use mavenCentral(). Unfortunately not all packages are available there, as of yet. Most projects, I know of, are going to shift to, or have already shifted to mavenCentral (Java and other JVM-related projects obviously). The current sunset is extended to the end of March 2021, which means, that after this point in time, no new packages can be published on jcenter(), but can still be retrieved from their (until Jan 2022).

This can be re-read on https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ which states:

On May 1, 2021, the sunset will impact all existing Bintray users. Bintray users will be blocked and will no longer be able to use the Bintray service. This includes existing software distribution, account administrative access, UI access, and the REST API.

After this date JCenter repository will still resolve artifacts, but end users should migrate to the canonical repo (e.g. Java packages should be retrieved from Maven Central). On Feb 1st, 2022 JCenter will only resolve artifacts for Artifactory clients.

like image 161
triplem Avatar answered Feb 16 '23 13:02

triplem