MicroKibaco / CrazyDailyQuestion

每日一问: 水滴石穿,聚沙成塔,坚持数月, 必有收获~
35 stars 1 forks source link

如何在JCenter发布项目? #100

Open MicroKibaco opened 4 years ago

MicroKibaco commented 4 years ago

1. project/build.gradle

在 project/build.gradle 添加如下代码:

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

2. your_moudle/build.gradle

为了上传到JCenter

apply plugin: 'com.novoda.bintray-release'
publish {
    userOrg = 'microkibaco'           //在https://bintray.com上注册的用户名
    groupId = 'com.microkibaco.github' //jCenter上的路径
    artifactId = 'crazydailyquestion'      //要上传的library名称(和二、4中的package相同)
    publishVersion = '1.0.0'        //library的版本号
    desc = 'crazy daily question is open for you' //library的简单描述
    website = 'https://juejin.im/user/2752832844861800' //library的开源地址,例如在github上的地址
} 

3. 执行uploadAdiviture 命令