-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcas-parser.publish.gradle.kts
More file actions
69 lines (61 loc) · 2.13 KB
/
cas-parser.publish.gradle.kts
File metadata and controls
69 lines (61 loc) · 2.13 KB
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
plugins {
`maven-publish`
signing
}
configure<PublishingExtension> {
publications {
register<MavenPublication>("maven") {
from(components["java"])
pom {
name.set("CAS Parser - Track Portfolios from CDSL, NSDL, CAMS, KFintech")
description.set("API for parsing and analyzing CAS (Consolidated Account Statement) PDF files\nfrom NSDL, CDSL, and CAMS/KFintech, with a unified response format")
url.set("https://docs.casparser.in")
licenses {
license {
name.set("Apache-2.0")
}
}
developers {
developer {
name.set("Cas Parser")
email.set("sameer@casparser.in")
}
}
scm {
connection.set("scm:git:git://github.com/CASParser/cas-parser-java.git")
developerConnection.set("scm:git:git://github.com/CASParser/cas-parser-java.git")
url.set("https://github.com/CASParser/cas-parser-java")
}
versionMapping {
allVariants {
fromResolutionResult()
}
}
}
}
}
repositories {
if (project.hasProperty("publishLocal")) {
maven {
name = "LocalFileSystem"
url = uri("${rootProject.layout.buildDirectory.get()}/local-maven-repo")
}
}
}
}
signing {
val signingKeyId = System.getenv("GPG_SIGNING_KEY_ID")?.ifBlank { null }
val signingKey = System.getenv("GPG_SIGNING_KEY")?.ifBlank { null }
val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")?.ifBlank { null }
if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(
signingKeyId,
signingKey,
signingPassword,
)
sign(publishing.publications["maven"])
}
}
tasks.named("publish") {
dependsOn(":closeAndReleaseSonatypeStagingRepository")
}