-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
70 lines (64 loc) · 2.31 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
plugins {
`version-catalog`
`maven-publish`
signing
}
group = "io.github.foodiestudio"
version = "2023.09.02"
catalog {
// declare the aliases, bundles and versions in this block
versionCatalog {
from(files("gradle/libs.versions.toml"))
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["versionCatalog"])
pom {
name.set("libs-versions")
description.set("A version catalog")
url.set("https://github.com/foodiestudio/libs-versions")
licenses {
license {
name.set("MIT License")
url.set("https://github.com/foodiestudio/libs-versions/blob/main/LICENSE")
}
}
developers {
developer {
id.set("kkoshin")
name.set("Ko Shin")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/foodiestudio/libs-versions")
connection.set("scm:git:https://github.com/foodiestudio/libs-versions.git")
developerConnection.set("scm:git:https://github.com/foodiestudio/libs-versions.git")
}
}
}
}
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
setUrl(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
signing {
// gpg -K --keyid-format short
val SIGNING_KEY_ID = System.getenv("SIGNING_KEY_ID")
// gpg --armor --export-secret-key
val SIGNING_KEY = System.getenv("SIGNING_KEY")
val SIGNING_PASSWORD = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(SIGNING_KEY_ID, SIGNING_KEY, SIGNING_PASSWORD)
sign(publishing.publications)
}
}