最新Android library 上传到 jitpack库
作者:
wenju | 来源:发表于
2021-04-20 14:19 被阅读0次
1.在library的gradle添加如下代码
apply plugin: 'maven-publish'
android{
...
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = 'com.example.library'
artifactId = 'final'
version = '1.0.0'
}
}
}
}
}
2.上传到github,创建一个releases包

创建一个releases包.png
3.复制github链接到jitpack生成

jitpack.png
本文标题:最新Android library 上传到 jitpack库
本文链接:https://www.haomeiwen.com/subject/xnknlltx.html
网友评论