Jcenter Deprecation; Impact on Gradle and Android

JCenter deprecation; impact on Gradle and Android

The latest update as mentioned here in JFrog's website is the following:

UPDATE 4/27/2021: We listened to the community and will keep JCenter as a read-only repository indefinitely. Our customers and the community can continue to rely on JCenter as a reliable mirror for Java packages.

JCenter is at end of life android lint warning, what is the replacement?

There's a documentation section describing the problem: JCenter deprecation and end of service. You can find the link by expanding the inspection description (Ctrl+F1). The documentation states:

JFrog, the company that maintains the JCenter artifact repository used by many Android projects,
recently announced the deprecation and upcoming retirement of JCenter. According to the announcement,
JCenter will allow downloads of existing artifacts until February 1, 2022.

Developers who publish artifacts on JCenter should start migrating their packages to a new host, such
as Maven Central.

In the near future, we will provide additional information about migrating Android projects away from
JCenter on this page.

The expanded inspection description (as well as the documentation above) suggests to replace jcenter() by mavenCentral(). Acually JCenter is a superset of Maven Central, but such a replacement won't resolve the problem until all JCenter artifacts your project uses will be moved to Maven Central.

I think the optimal solution would be to wait until the libraries you're using are moved from jcenter() and try to replace it with mavenCentral(). If some artifacts are still missing, take a look at the documentation, may be they are moved into another repository and you should add it to the repositories list as well.

repositories {
google()

// jcenter() // <- removed
mavenCentral() // <- added
}

If you're a library author you should migrate to another repo, probably it would be Maven Central. Note that according to the JCenter deprecation announcement new submissions are allowed only until March 31st 2021.

A few related resources:

  • The jCenter & Bintray is Shutting Down. Now What?
  • Migrating away from JCenter

How to suppress gradle warning about Deprecated Gradle features?

Sorry - you may not like the answer.

There is no option in gradle (7.2) to suppress specific deprecation. Fixing the build file is going to be cheaper and correct.

What is included in JCenter repository in Gradle?

jcenter() is similar to mavenCentral(). Have a look at https://bintray.com/bintray/jcenter for more details. The JCenter guys claim that they have a better performance than Maven Central.

jcenter.bintray.com is down Error: 502 Bad Gateway

It's a global outage in JCenter. You can monitor status at https://status.gradle.com. It replaces the bintray status page which seems is now fully sunset and returns a 502 error.

UPDATE Jan 13, 06:35 UTC

JCenter is now back online, and systems are fully operational.

UPDATE Jan 20

Gradle Plugin resolution outage postmortem

https://blog.gradle.org/plugins-jcenter

Following this incident, the Gradle Plugin Portal now uses a JCenter mirror hosted by Gradle instead of JCenter directly. This should shield users from short JCenter outages for libraries that have been cached by the mirror. We saw another short outage of JCenter over the weekend and this did not appear to impact Gradle Plugin Portal users.

PRDownloader not working even after implementing library. Unknown Reference for: PRDownloader in Android Studio

There isn't version 0.6.0, the latest one's 0.5.0.

Fix your code line to:

implementation 'com.mindorks.android:prdownloader:0.5.0'

Also on the following Gradle script build.gradle(Project: YOURPROJECTNAME) the jcenter() repository in repositories statement:

repositories {
google()
mavenCentral()
jcenter()
}

Warning: jcenter() repository's already deprecated for Android development. The most ideal solution would be to look for some other similar library that offers support to mavenCentral() over one for avoiding deprecated repositories on your projects.

Reference:

  1. https://mvnrepository.com/artifact/com.mindorks.android/prdownloader?repo=jcenter

  2. JCenter deprecation; impact on Gradle and Android

Failed to resolve one of the libraries in Android Studio gradle dependencies

Please go through link

If possible try latest library for the same because both libraries are not maintained from last few years.

Add jCenter repository in project’s build.gradle file as shown below and sync your project:

allprojects {
repositories {
jcenter()
. . .
}
}

Note- In the latest android code it will available in settings.gradle file

  pluginManagement {
repositories {
jcenter()
...
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
jcenter()
..
}

}


Related Topics



Leave a reply



Submit