How to update library for new version in Bintray?

匆匆过客 提交于 2019-11-29 06:29:25

You will have to change the version in the publish section of your build.gradle file. Then, run the plugin again.

This will create a new version in bintray.

These are the steps I follow whenever I update my Bintray library:

  1. Update the libraryVersion name in your library module build.gradle file. See this answer for more on that.

    ext {
        ...     
        libraryVersion = '2.0.0'
        ...
    }
    
  2. Create a new version in Bintray that matches what you called libraryVersion in your build.gradle file.

  1. In the root folder of your project, run the following command in a terminal.

    ./gradlew bintrayUpload
    

    There are different things that can fail here. Google the error code to solve it. Here were a couple recent ones for me.

  2. Update your GitHub documentation and create new release matching the Bintray version.

After following these steps my project was immediately updated on Bintray (and jCenter).

Notes

  • It is possible to make an update by only changing the libraryVersion and running ./gradlew bintrayUpload (and not create a new release in Github or a new version in Bintray). However, when I did that it removed the version history in Bintray, so my current preference is to do all four steps above.

Related

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!