-
Notifications
You must be signed in to change notification settings - Fork 339
/
maven.gradle
59 lines (56 loc) · 2.09 KB
/
maven.gradle
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apply plugin: 'maven-publish'
apply plugin: 'signing'
tasks.register('generateSourcesJar', Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier.set("sources")
}
Properties localProperties = new Properties()
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
from components.release
groupId "io.github.azhon"
artifactId project.ARTIFACT_ID
version rootProject.ext.publishVersion
artifact generateSourcesJar
pom {
name = 'AppUpdate'
description = 'Android App update library. Android版本更新库,简单、轻量、可随意定制'
url = 'https://github.com/azhon/AppUpdate'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'azhon'
name = 'azhon'
email = 'azhon.cn@gmail.com'
}
}
scm {
connection = 'https://github.com/azhon/AppUpdate.git'
developerConnection = 'https://github.com/azhon/AppUpdate.git'
url = 'https://github.com/azhon/AppUpdate'
}
}
}
}
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username localProperties.getProperty('sonatype.name')
password localProperties.getProperty('sonatype.password')
}
}
}
}
}
signing {
sign publishing.publications
}