如何创建发布关闭?(安卓工作室)

kos*_*lvp 3 android android-gradle-plugin

当我想在 Android Studio 中构建我的项目时,出现此错误:

Have you created the publish closure? Missing publishVersion. Missing desc. 
Run Code Online (Sandbox Code Playgroud)

半年前,我对这个项目进行了最后一次更改。现在我已经从 github 克隆了它,但出现了这个错误。请帮我解决这个问题。

Blu*_*ell 6

巧合的是我遇到了这个,错误来自一个 Novoda 库(我工作的地方!):-)

https://github.com/novoda/bintray-release

您已将此依赖项添加到顶级存储库:

 classpath 'com.novoda:bintray-release:0.8.0'
Run Code Online (Sandbox Code Playgroud)

它需要添加到build.gradle您要发布的模块的 ,也许applibrary

之后,您需要将publish闭包添加到同一个文件中:

publish {
    userOrg = 'novoda'
    groupId = 'com.novoda'
    artifactId = 'bintray-release'
    publishVersion = '0.6.1'
    desc = 'Oh hi, this is a nice description for a project, right?'
    website = 'https://github.com/novoda/bintray-release'
}
Run Code Online (Sandbox Code Playgroud)

更多信息写在repo readme 中