-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle.kts
74 lines (65 loc) · 1.82 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
plugins {
kotlin("jvm") version "2.1.0"
jacoco
id("org.sonarqube") version "5.1.0.4882"
id("com.diffplug.spotless") version "6.25.0"
`maven-publish`
}
repositories {
mavenLocal()
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
testImplementation("org.junit.jupiter:junit-jupiter:[5.11.3,)")
testImplementation("org.hamcrest:hamcrest-core:[3.0,)")
testImplementation("org.zapodot:embedded-db-junit-jupiter:[2.2.0,)")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:[1.11.3,)")
}
tasks.test {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()
}
group = "com.github.javadev"
version = "1.32-SNAPSHOT"
description = "leetcode-in-kotlin"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
spotless {
kotlin {
encoding("UTF-8")
target("**/src/**/*.kt")
ktlint("0.50.0").editorConfigOverride(
mapOf(
"max_line_length" to "120",
"indent_size" to "4",
"ktlint_standard_package-name" to "disabled",
"ktlint_standard_comment-wrapping" to "disabled"
)
)
toggleOffOn()
trimTrailingWhitespace()
endWithNewline()
}
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(false)
}
}