Upload the project to JCenter/Bintray under AndroidStudio

This article is for personal notes only

  • Bintray官网:https://bintray.com
  • The git project address used in the personal example: https://github.com/makai554892700/JSONDecodePojo.git
  • Account registration (skip if you already have an account)

    • Open Bintray official website in browser
    • Swipe to the bottom of the page and tap the icon if shown
    • Fill in your personal information according to your personal preferences, and click the icon at the bottom to register
    • After clicking register, the following interface will appear
    • Go to the mailbox to open the received verification email and click the link (the email may be a little slow, it may take a few minutes)
    • Click the activation link to go directly to the login page, enter the password to log in.
    • After logging in, click the location shown in the figure to add a warehouse.
    • After adding the warehouse, add the package name as shown in the figure for later use
    • get key
    • Click the button shown in the upper right corner of the page
    • As shown in the figure, click the Api key, enter the password, and click Submit
    • Click the button as shown to copy the key to the clipboard, or click Show to view the key and copy and save it
    • At the same time, the user name can also be obtained in this interface, save it for later use
    • Configure the project
    • Open the build.gradle file of the project where the jar package needs to be uploaded, and add the configuration as shown in the figure. The configuration instructions have been explained in the screenshots
    • For the convenience of configuration and use, paste all relevant configuration content here. If it is not clear enough, you can download the project reference mentioned at the top of the article with github.

      apply plugin: 'com.novoda.bintray-release'
      buildscript {
          repositories {
              jcenter()
          }
          dependencies {
              classpath 'com.novoda:bintray-release:0.3.4'
          }
      }
      publish {
          userOrg = 'marking'
          groupId = 'com.mayousheng.www'
          artifactId = 'basepojo'
          publishVersion = '0.0.1'
          desc = 'JSON decode pojo'
          website = 'https://github.com/makai554892700/JSONDecodePojo/tree/master/basepojo'
      }
      tasks.withType(Javadoc) {
          options {
              encoding "UTF-8"
              charSet 'UTF-8'
          }
          options.addStringOption('Xdoclint:none', '-quiet')
      }
      
    • Package and upload the jar package, open the AS command line to run (replace where PBINTRAY_NAME is the website username, and PBINTRAY_KEY is the key that was copied and saved just now)
      gradlew clean build bintrayUpload -PbintrayUser=PBINTRAY_NAME -PbintrayKey=PBINTRAY_KEY -PdryRun=false
    • The example is shown in the figure. If it runs correctly, it means that the upload is ok. If there are other problems here, you may need to Baidu by yourself.
    • So far the jar package has been uploaded to Bintray, but it is not available for others to use at this time
    • Expose the jar package to JCenter
    • Go back to the home page, find the Last Activity as shown, select the jar package you just uploaded and click, the operation is as shown in the figure
    • Scroll to the bottom of the page, find the icon as shown in the figure, and click Add to JCenter
    • The following interface appears, fill in the application description and click Send, and the rest is a long wait.
    • So far all steps are completed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325422276&siteId=291194637