-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
66 lines (54 loc) · 1.37 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.20"
`maven-publish`
id("com.diffplug.spotless") version "6.4.2"
}
group = "com.github.aymanizz"
version = "2.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
implementation("io.ktor:ktor-server-core:2.0.0")
testImplementation("io.ktor:ktor-server-test-host:2.0.0")
testImplementation("org.jetbrains.kotlin:kotlin-test:1.6.20")
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += listOf("-Werror")
}
tasks.test {
useJUnitPlatform()
}
java.withSourcesJar()
spotless {
format("misc") {
target("*.gradle", "**/*.md", "**/.gitignore")
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
val ktlintVersion = "0.37.2"
val ktlintUserData = mapOf(
"indent_size" to "4", "continuation_indent_size" to "4", "enableExperimentalRules" to "true"
)
kotlin {
ktlint(ktlintVersion).apply {
userData(ktlintUserData)
}
}
kotlinGradle {
ktlint(ktlintVersion).apply {
userData(ktlintUserData)
}
}
}
publishing {
publications {
create<MavenPublication>("ktor-i18n") {
from(components["java"])
}
}
}