首页 > 解决方案 > 如何创建发布闭包?(安卓工作室)

问题描述

当我想在 Android Studio 中构建我的项目时,我收到了这个错误:

Have you created the publish closure? Missing publishVersion. Missing desc. 

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

标签: androidandroid-gradle-plugin

解决方案


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

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

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

 classpath 'com.novoda:bintray-release:0.8.0'

它需要添加到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'
}

更多信息写在repo 自述文件中。


推荐阅读