As many of you probably already know, JCenter is being scrapped on Android.

I was surprised to see such a big event. I thought it was something Google was up to, because Google likes to throw things away. As it turns out, Google is also a victim.

On February 3, JFrog, the operator of JCenter, announced on its website that it was discontinuing several of its package management and distribution services, including Bintray and JCenter. The link to the original article is as follows:

Jfrog.com/blog/into-t…

JFrog’s statement is a powerful one. Why? Because it’s going to affect all Android developers, yes you heard that right, all of them.

If you’re an Android developer, you’re probably using JFrog’s services, even if you don’t know the name.

When we create a new Android project in Android Studio, you can always find this configuration in the build.gradle file:

repositories {
    google()
    jcenter()
}
Copy the code

This configuration specifies the repository from which the current project project can pull the dependency libraries for use by the current project.

Among them, Google () refers to Google’s own warehouse, for example, many first-party libraries we use, such as RecyclerView, Jetpack Components and so on, are pulled from here.

Jcenter () is the JCenter repository provided by JFrog that almost all third-party open source projects on Android choose to publish. Third-party libraries such as OkHttp, Retrofit, RxJava, etc. that you integrate into your project are pulled from here.

Android’s third-party libraries are so large that they far outnumber Google’s first-party libraries that any Android project relies on many third-party open source projects. That’s why I say that JFrog’s statement is killing a lot.

Let me take a closer look at the effects of the JCenter outage and when those effects will take effect.

There is no doubt that the closure of JCenter will affect two groups of people: developers of open source libraries and users of open source libraries.

Open source library developers are likely to have the most to worry about for some time to come, because by the time this article is published, you won’t be able to submit any library updates to JCenter.

JCenter will not accept any new submissions after March 31, 2021, according to JFrog’s timeline.

It just so happens that I have a new version of the open source library (PermissionX) to be released recently, and I submitted the new version to JCenter as usual two days ago, only to find that the submission failed. Then I went to the JFrog website to find this date. Unfortunately, the new version will not be released for the time being.

If you’re an open source library user, you don’t have to worry for a while, as JCenter will continue to be available until February 1, 2022. Until then, you can still pull open source libraries submitted to JCenter by March 31, 2021 as normal in Android Studio.

That’s about it, but for Android developers at large, what should we do now?

I don’t think there’s much that can be done right now, because there’s still a very core player that hasn’t taken a stand on this whole thing, and that’s Google.

Having said that, Google is also a victim of this incident, and I thought Google was forming a strategic partnership with JFrog when Android Studio was created with the JCenter repository integrated by default. JFrog’s announcement of a discontinuation of service directly affects the entire Android open source library ecosystem.

This happened quite suddenly, JFrog2 only announced it on March 3rd and stopped accepting new library submissions on March 31st. Feeling like Google didn’t have enough time to respond, they just posted this simple statement on the Android developer website:

JCenter is out of service. We recommend that you use Maven Central instead. Google will release a migration solution shortly.

Maven Central was the default third-party repository for Android before JCenter.

I wonder if Google has any plans to build its own repository of third-party open source projects so that it doesn’t have to worry about being suddenly stopped. I checked with Google and was told that they had no plans to use Maven Central.

If you now want to publish your own open source libraries to Maven Central, you can use this document to do so:

Maven.apache.org/repository/…

I have found that some libraries have responded so quickly that they are now releasing new versions to Maven Central, such as Glide.

As you can see, Glide has replaced JCenter () with mavenCentral() in the repositories.

But adding warehouses manually is hardly a standard, so it’s up to Google to push it. It won’t be long before the default repository for creating new projects in Android Studio changes from JCenter () to mavenCentral().

However, we can only release a new version of the library to Maven Central, while the old version will remain on JCenter. These old versions will be completely inaccessible by February 1st next year, so we still need a migration plan from Google as soon as possible. This allows third-party open source libraries to seamlessly switch from JCenter to Maven Central.

The migration plan will be updated at the following website, and I will of course write an article explaining it at that time.

Developer.android.com/studio/buil…

As a developer, we should maintain the mindset and ability to always embrace change. However, as an Android developer, I can’t help but wonder: Aren’t we changing a little too fast?

Pay attention to my technical public account “Guo Lin”, there are high-quality technical articles pushed every working day.