-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
67 lines (60 loc) · 2 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
plugins {
`java-library`
`maven-publish`
signing
}
group = "dev.yavin"
version = "0.10"
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "demo-config"
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("yavin demo config files")
description.set("hjson files for demo")
url.set("http://yavin.dev")
licenses {
license {
name.set("MIT")
}
}
developers {
developer {
id.set("jkusa")
name.set("Jon Kilroy")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/yavin-dev/demo-config.git")
developerConnection.set("scm:git:ssh:[email protected]:yavin-dev/demo-config.git")
url.set("http://yavin.devs")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = System.getenv("OSSRH_USER") as String?
password = System.getenv("OSSRH_TOKEN") as String?
}
}
}
}
project.setProperty("signing.password", System.getenv("GPG_SIGN_PASS"))
signing {
sign(publishing.publications["mavenJava"])
}