-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
86 lines (71 loc) · 2.49 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
80
81
82
83
84
85
86
import java.net.URI
plugins {
kotlin("jvm").version(libs.versions.kotlin)
`maven-publish`
alias(libs.plugins.dokka)
alias(libs.plugins.ktfmt)
signing
}
val tabourVersion = rootProject.file("version").readText().trim()
repositories { mavenCentral() }
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "maven-publish")
apply(plugin = "com.ncorti.ktfmt.gradle")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "signing")
version = tabourVersion
repositories { mavenCentral() }
kotlin { jvmToolchain(21) }
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
repositories {
maven {
url =
URI.create(
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
authentication {
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
pom {
name = "Tabour"
description = "A Kotlin library to consume and produce SQS messages"
url = "https://github.com/katanox/tabour"
groupId = "com.katanox.tabour"
version = tabourVersion
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "katanoxdevs"
name = "Katanox Developers"
email = "katanox@developers.com"
}
}
scm { url = "https://github.com/katanox/tabour" }
}
}
}
}
}
signing { sign(publishing.publications["gpr"]) }
ktfmt { kotlinLangStyle() }
tasks.test { useJUnitPlatform() }
}