-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
79 lines (69 loc) · 2.83 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
71
72
73
74
75
76
77
78
79
plugins {
kotlin("jvm") version "2.1.0"
}
group = "com.github.gianttreelp.proguardservicesmapper"
version = "1.2-SNAPSHOT"
repositories {
mavenCentral()
}
subprojects {
apply(plugin = "maven-publish")
apply(plugin = "signing")
project.gradle.projectsEvaluated {
configure<PublishingExtension> {
repositories {
maven {
name = "ossrh"
url = uri(
if ([email protected]().endsWith("SNAPSHOT")) {
"https://oss.sonatype.org/content/repositories/snapshots"
} else {
"https://oss.sonatype.org/service/local/staging/deploy/maven2"
}
)
credentials {
username = project.findProperty("ossrhUsername") as String? ?: System.getenv("OSSRH_USER")
password = project.findProperty("ossrhPassword") as String? ?: System.getenv("OSSRH_PASSWORD")
}
}
}
}
val publications: PublicationContainer = extensions.getByType<PublishingExtension>().publications
publications.withType<MavenPublication>().forEach {
it.pom {
name.set(project.name)
description.set("A utility to map Java services to their obfuscated counterparts.")
url.set("https://github.com/GiantTreeLP/proguard-services-mapper")
packaging = "jar"
scm {
connection.set("scm:git:https://github.com/GiantTreeLP/proguard-services-mapper")
developerConnection.set("scm:git:https://github.com/GiantTreeLP")
url.set("https://github.com/GiantTreeLP/proguard-services-mapper")
}
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
developers {
developer {
id.set("gianttreelp")
name.set("Marvin K")
email.set("[email protected]")
}
}
}
}
configure<SigningExtension> {
useGpgCmd()
val signingKey =
project.findProperty("signingKey") as String? ?: System.getenv("GPG_PRIVATE_KEY")?.replace("\\n", "\n")
val signingKeyPassphrase =
project.findProperty("signingPassphrase") as String? ?: System.getenv("GPG_PASSPHRASE")
useInMemoryPgpKeys(signingKey, signingKeyPassphrase)
sign(publications)
}
}
}