-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
136 lines (121 loc) · 4.26 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import java.net.URI
buildscript {
repositories {
mavenCentral()
}
}
plugins {
kotlin("jvm") version "2.0.20"
`java-library`
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("org.jetbrains.kotlinx.kover") version "0.8.3"
`maven-publish`
signing
idea
}
allprojects {
group = "com.himadieiev"
version = "1.3.2"
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "kotlin")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "idea")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "org.jetbrains.kotlinx.kover")
kotlin {
jvmToolchain(11)
}
java {
withJavadocJar()
withSourcesJar()
}
val artifacts =
mapOf(
"redpulsar-core" to
mapOf(
"name" to "RedPulsar Core",
"description" to "Provides core functionality for RedPulsar Distributed locks and utilities.",
"url" to "https://github.com/himadieievsv/redpulsar/tree/main/redpulsar-core",
),
"redpulsar-jedis" to
mapOf(
"name" to "RedPulsar Jedis",
"description" to "RedPulsar Distributed locks and utilities for Redis with Jedis client.",
"url" to "https://github.com/himadieievsv/redpulsar/tree/main/redpulsar-jedis",
),
"redpulsar-lettuce" to
mapOf(
"name" to "RedPulsar Lettuce",
"description" to "RedPulsar Distributed locks and utilities for Redis with Lettuce client",
"url" to "https://github.com/himadieievsv/redpulsar/tree/main/redpulsar-lettuce",
),
)
dependencies {
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.slf4j:slf4j-simple:2.0.9")
testImplementation(platform("org.junit:junit-bom:5.10.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("io.mockk:mockk:1.13.8")
}
publishing {
repositories {
maven {
url = URI.create("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = providers.gradleProperty("ossrhUsername").get()
password = providers.gradleProperty("ossrhPassword").get()
}
}
}
publications {
create<MavenPublication>("mavenJava") {
groupId = group.toString()
artifactId = project.name
version = version.toString()
from(components["java"])
pom {
name.set(artifacts[project.name]?.get("name"))
description.set(artifacts[project.name]?.get("description"))
url.set(artifacts[project.name]?.get("url"))
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("himadieievsv")
name.set("Serhii Himadieiev")
}
}
scm {
connection.set("scm:git:git://github.com/himadieievsv/redpulsar.git")
developerConnection.set("scm:git:ssh://github.com/himadieievsv/redpulsar.git")
url.set("https://github.com/himadieievsv/redpulsar")
}
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
tasks.test {
useJUnitPlatform {
excludeTags(*System.getProperty("excludeTags", "no-tag").split(",").toTypedArray())
}
reports {
junitXml.apply {
isOutputPerTestCase = true
}
}
}
}