將android 本地組件/開源庫發佈到遠程倉庫 jitpack.io

首先呢,你的項目必須已經發布到了github,發佈github

1、打開本地項目,在根目錄下 build.gradle 中添加
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
最好使用最新版本,鏈接

2、在組件library的 build.gradle 中添加
apply plugin: 'com.github.dcendents.android-maven' group='com.github.tianshi'
group='com.github.github用戶名

3、進入github,打開項目,選擇releases

選擇Create a new releases
發佈完成後,可以打開https://jitpack.io/,查看引用方法
複製github的項目地址,粘貼到jitpack.io的搜索框,
點擊Look up—>Git it,然後就可以看到使用方法了,

大功告成噠

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章