-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
102 lines (85 loc) · 2.32 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
102 lines (85 loc) · 2.32 KB
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
plugins {
`java-library`
application
id("com.vanniktech.maven.publish") version "0.34.0"
}
group = "io.github.stepanmail1999-ctrl"
version = "0.6.2"
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
application {
mainClass.set("io.log2jv.Demo")
}
tasks.withType<JavaCompile> {
options.release.set(11)
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
}
tasks.withType<JavaExec> {
jvmArgs("-Dfile.encoding=UTF-8")
}
tasks.test {
jvmArgs("-Dfile.encoding=UTF-8")
useJUnitPlatform()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.jar {
manifest {
attributes(
"Implementation-Title" to "Log2JV",
"Implementation-Version" to project.version,
)
}
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
coordinates(
groupId = group.toString(),
artifactId = "log2jv",
version = version.toString()
)
pom {
name.set("Log2JV")
description.set("Simple zero-dependency Java logging library")
inceptionYear.set("2026")
url.set("https://github.com/stepanmail1999-ctrl/Log2JV")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
developers {
developer {
id.set("stepanmail1999-ctrl")
name.set("Stepan")
email.set("stepanmail1999@gmail.com")
}
}
scm {
url.set("https://github.com/stepanmail1999-ctrl/Log2JV")
connection.set("scm:git:git://github.com/stepanmail1999-ctrl/Log2JV.git")
developerConnection.set("scm:git:ssh://github.com/stepanmail1999-ctrl/Log2JV.git")
}
}
}
tasks.register("printJarPath") {
dependsOn(tasks.jar)
doLast {
println("JAR: ${tasks.jar.get().archiveFile.get().asFile}")
}
}