Android uses Bintray to publish AAR to Jcenter

Source: Internet
Author: User

Objective

This two-day whim suddenly wanted to put the AAR of their Android library into the Jcenter, so that they can at any time and anywhere on the internet to get their own library reference, and now Android Studio has already defaulted on Jcenter's repositories as a source of dependency, and the previous mavencenter has begun to slowly discard it.

After half a day of hard work Gaocheng, but also encountered a lot of pits here to share the same ideas with you friends

(declares that this article is all about personal experience, and this article does not have to detail the details of all the steps, as far as possible to explain the important areas encountered, but also need the reader to practice, because this is the respect of the reader)

Apply for Bintray Account

To the Bintray website registration OSS account, use this site registration do not use the second, the second is enterprise-class;

Https://bintray.com/signup/oss

Https://bintray.com/signup

Because the Bintray official website constantly updated so the registration mechanism to increase the enterprise-level concept, so many before about Bintray upload Gradle build AAR posts are not up to the times ...

Before I myself follow Google's search results have been entered is the second URL, enterprise-level account must be set organization account, the results of two accounts to get around the people dizzy

Then prompt the following error:

http/1.1 401 Unauthorized [message:this resource requires authentication]

It turned out to be a miserable sum!

Then find the API key on your home page and create a repostiry type maven, maven-named repository for later use!

Writing Gradle Scripts

1, follow the guidance of Https://github.com/msdx/gradle-publish step by step, and then in your gradle tasks inside other find install and execute, The purpose of this step is to allow you to generate POM files based on the configuration inside the gradle.properties, which can be found under library/build/outputs

 2, in the library gradle tasks found Publishing->bintrayupload to the AAR upload, upload success will get Gradle build successfully tips

3. Go to Bintray Home select Maven Repository then go in and click Add to Jcenter follow the prompts to write the annotations and submit, this will wait a certain time to review!

OK Gaocheng

Android uses Bintray to publish AAR to Jcenter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.