-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
80 lines (68 loc) · 2.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
67
68
69
70
71
72
73
74
75
76
77
78
79
plugins {
id("java")
id("java-library")
id("maven-publish")
}
group = libs.versions.group.get()
version = libs.versions.version.get()
repositories {
mavenCentral()
maven("https://repository.voinearadu.dev/repository/maven-releases/")
}
dependencies {
// Dependencies
api(libs.gson)
compileOnly(libs.jedis)
testImplementation(libs.jedis)
// Annotations
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok)
compileOnly(libs.jetbrains.annotations)
annotationProcessor(libs.jetbrains.annotations)
testCompileOnly(libs.jetbrains.annotations)
testAnnotationProcessor(libs.jetbrains.annotations)
// Tests
testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter)
}
tasks {
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
if (project.properties["com.voinearadu.publish"] == "true") {
maven(url = (project.findProperty("com.voinearadu.url") ?: "") as String) {
name = "VoineaRaduRepository"
credentials(PasswordCredentials::class) {
username = (project.findProperty("com.voinearadu.auth.username") ?: "") as String
password = (project.findProperty("com.voinearadu.auth.password") ?: "") as String
}
}
}
if (project.properties["generic.publish"] == "true") {
maven(url = (project.findProperty("generic.url") ?: "") as String) {
name = "GenericRepository"
credentials(PasswordCredentials::class) {
username = (project.findProperty("generic.auth.username") ?: "") as String
password = (project.findProperty("generic.auth.password") ?: "") as String
}
}
}
}
}