约 108 字 预计阅读 1 分钟
1. 创建自己的android module
2. 配置gradle文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| plugins {
...
id 'maven-publish'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.Healwy'
artifactId = 'image-preview-compose'
version = '1.0'
}
}
}
}
|
配置gradle引用
1
2
3
4
5
6
| allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
|
1
| implementation 'com.github.User:Repo:Tag'
|