如何在Bintray中更新库到新版本?

10

enter image description here

我第一次使用novoda/bintray-release将我的库发布到jCenter作为v1.0.0版本。 实际上,我想将其更新为v1.0.1,该怎么做? [编辑] 我添加了另一个库的发布说明图片,如下所示。

enter image description here

2个回答

9

每当我更新Bintray库时,我都会按照以下步骤进行:

  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.

enter image description here

  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.

按照这些步骤之后,我的项目立即在Bintray(和jCenter)上得到了更新。

注释

  • 只更改libraryVersion并运行./gradlew bintrayUpload可以进行更新(而无需在Github中创建新的发布版本或在Bintray中创建新版本)。但是,当我这样做时,它会删除Bintray中的版本历史记录,因此我目前更喜欢执行上述所有四个步骤。

相关


6
您需要在build.gradle文件的发布部分更改版本。然后再次运行插件。
这将在bintray中创建一个新版本。

是的,我尝试在更改了“publishVersion”后更新它,但它创建了一个新的版本。 - kimkevin
Bintray中没有重命名版本的功能。您可以删除旧版本。 - galusben

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接