-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
75 lines (65 loc) · 2.3 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
plugins {
kotlin("jvm") version "1.7.10"
`java-library`
`maven-publish`
signing
}
group = "io.github.kscripting"
version = "1.5.0"
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "kscript-annotations"
from(components["java"])
pom {
name.set("kscript-annotations")
description.set("Annotation directives for kscript")
url.set("https://github.com/kscripting/kscript-annotations")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("holgerbrandl")
name.set("Holger Brandl")
email.set("holgerbrandl@gmail.com")
}
developer {
id.set("aartiPl")
name.set("Marcin Kuszczak")
email.set("aarti@interia.pl")
}
}
scm {
connection.set("scm:git:git://https://github.com/kscripting/kscript-annotations.git")
developerConnection.set("scm:git:ssh:https://github.com/kscripting/kscript-annotations.git")
url.set("https://github.com/kscripting/kscript-annotations")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = project.findProperty("sonatype.user") as String? ?: System.getenv("SONATYPE_USER")
password = project.findProperty("sonatype.password") as String? ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}