-
Notifications
You must be signed in to change notification settings - Fork 9
/
maven-publish.gradle
84 lines (76 loc) · 2.75 KB
/
maven-publish.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
apply plugin: "maven-publish"
apply plugin: "signing"
task javadocsJar(type: Jar, dependsOn: "dokkaJavadoc") {
getArchiveClassifier().set("javadoc")
from dokkaJavadoc.outputDirectory
}
task sourcesJar(type: Jar) {
getArchiveClassifier().set("sources")
from sourceSets.main.allJava
}
afterEvaluate {
publishing {
def properties = project.ext.mavenPublishProperties
repositories {
maven {
name "SonatypeMavenCentral"
url properties.repository.url
credentials {
username properties.repository.username
password properties.repository.password
}
}
}
publications {
release(MavenPublication) {
from components.java
groupId = properties.group
version = properties.version
artifactId = properties.artifactId
artifact sourcesJar
artifact javadocsJar
pom {
name = properties.name
description = properties.description
url = properties.url
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'stjepanbanek'
name = 'Stjepan Banek'
email = '[email protected]'
}
developer {
id = 'nikolagobovic'
name = 'Nikola Gobovic'
email = '[email protected]'
}
developer {
id = 'thisAAY'
name = 'Ahmed Ali'
email = '[email protected]'
}
developer {
id = 'DrakslerT'
name = 'Tim Draksler'
email = '[email protected]'
}
}
scm {
connection.set(properties.scm.connection)
developerConnection.set(properties.scm.connection)
url.set(properties.scm.url)
}
}
signing {
sign publishing.publications.release
}
}
}
}
}