我最近将我的
github项目上传到bintray并成功将其与JCenter存储库同步.
我用过这个教程:
我用过这个教程:
http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
所以我的gradle依赖是:
dependencies { compile 'com.github.danylo2006:hashtag-helper:1.1.0' }
为了上传它,我修改了我的build.gradle并添加了相关的脚本安静.教程中的所有内容.
... some code here ext { bintrayRepo = 'maven' bintrayName = 'hashtag-helper' publishedGroupId = 'com.github.danylo2006' libraryName = 'HashTagHelper' artifact = 'hashtag-helper' libraryDescription = 'This is a library designed for highlighting hashtags ("#example") and catching click on them.' siteUrl = 'https://github.com/danylo2006/HashTagHelper' gitUrl = 'https://github.com/danylo2006/HashTagHelper.git' libraryVersion = '1.1.0' developerId = 'danylovolokh' developerName = 'Danylo Volokh' developerEmail = 'v.danylo@gmail.com' licenseName = 'The Apache Software License,Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] }
这是棘手的部分:
我已经将我的github昵称danylo2006改为danylovolokh,现在我想改变gradle依赖:
dependencies { compile 'com.github.danylo2006:hashtag-helper:1.1.0' }
改成:
dependencies { compile 'com.github.danylovolokh:hashtag-helper:1.1.0' }
>我从Sonatype获得了我需要的groupId
>所以我修改了我的gradle脚本.
唯一相关的变化是:
publishedGroupId = 'com.github.danylo2006'
已改为
publishedGroupId = 'com.github.danylovolokh'
我运行相关命令:
gradlew安装
gradlew bintrayUpload
我得到了BUILD_SUCCESSFULL
但是如果我向任何其他gradle项目添加新依赖项,我会收到错误“错误:(36,13)无法解决:com.github.danylovolokh:hashtag-helper:1.1.0”
解决方法
包含在JCenter中的是groupId的路径. JFrog还需要包含从包到JCenter的新路径. 请通过support@bintray.com联系JFrog支持
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。