-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle.kts
49 lines (47 loc) · 1.72 KB
/
publish.gradle.kts
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
apply(plugin = "maven-publish")
apply(plugin = "signing")
configure<PublishingExtension> {
publications {
register<MavenPublication>("release") {
afterEvaluate {
from(components["release"])
}
pom {
name = extra["pomName"] as String
description = extra["pomDescription"] as String
url = extra["pomUrl"] as String
licenses {
license {
name = "Apache-2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
name = "Kamal Faraj"
email = "kfaraj.dev@gmail.com"
}
}
scm {
connection = "scm:git:https://gitlab.com/kfaraj/support.git"
developerConnection = "scm:git:https://gitlab.com/kfaraj/support.git"
url = "https://gitlab.com/kfaraj/support"
}
}
}
}
repositories {
maven {
val stagingUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("-SNAPSHOT")) snapshotsUrl else stagingUrl)
credentials {
username = properties["ossrhUsername"] as String?
password = properties["ossrhPassword"] as String?
}
}
}
}
configure<SigningExtension> {
sign(the<PublishingExtension>().publications["release"])
}