简体   繁体   中英

Uploading Android library to Maven Central

When using Android Studio, I am aware that you can add dependencies like so:

Android Studio项目结构窗口 Then you can search to find repositories, and Android Studio will notify you when you need to update the version of your library dependency.

Android Studio库更新通知

I also have a library (currently on Bintray), but it doesn't appear in the library dependency list (as in the first screenshot) - is this because the list shows libraries from Maven Central?

If so, how would I go about putting my library on Maven Central? I have looked at some results on Google, but different blog pages and tutorials show different steps, so it can be very confusing.

Since my library ( view on GitHub ) is using the Novoda Bintray Release plugin , I have tried following the instructions from this wiki page to add my library to Maven Central, but I'm not really sure where to go from here.

So, to summarise, what I am asking is:

  1. Do I need to upload my library to Maven Central?
  2. If so, how would I do that? Should I carry on using the Novoda plugin, or should I switch to something easier to use.

The current default maven repository for android gradle plugin is not Maven Central, but JCenter , and this is probably what you are looking for. If you currently have a library deployed to your maven repository on Bintray, publishing to JCenter (also managed by Bintray) is very easy and requires clicking a button, describing your library and waiting for approval. The whole process is neatly explained here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM