-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjitpack.gradle
More file actions
37 lines (35 loc) · 1.01 KB
/
jitpack.gradle
File metadata and controls
37 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'//jitpack
/*****************jitpack***************/
def VERSION_NAME = rootProject.ext.publish.version// 版本
def GROUP_ID = 'com.gitee.mahongyin'
def ARTIFACT_ID = "nanohttp"
group = GROUP_ID
version = VERSION_NAME
task androidSourcesJar(type: Jar) {
//archiveClassifier.set("sources")
// 源码路径,包含Java、kotlin代码
from android.sourceSets.main.java.getSrcDirs()
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
afterEvaluate {
publishing {
// singleVariant("release")
publications {
release(MavenPublication) {
from components.java
groupId = GROUP_ID
artifactId = ARTIFACT_ID
version = VERSION_NAME
artifact androidSourcesJar
}
}
repositories {
maven {
url = "../repo"
}
}
}
}
//lib模块目录./gradlew publish