-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
101 lines (87 loc) · 2.18 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
object Version {
const val KOTLIN = "1.3.60"
const val KTOR = "1.2.5"
const val JVM = "1.8"
const val COROUTINES = "1.3.2"
const val JUNIT = "5.3.2"
}
plugins {
id("io.gitlab.arturbosch.detekt") version "1.0.0.RC6-2"
id("org.jmailen.kotlinter") version "1.21.0"
id("org.sonarqube") version "2.6.2"
id("application") apply true
id("org.jetbrains.kotlin.jvm") version "1.3.21" apply true
id("java") apply true
id("maven") apply true
id("maven-publish")
id("idea") apply true
}
application {
mainClassName = "com.mantono.MainKt"
}
group = "com.mantono"
version = "0.1.0"
description = "Rate limiter feature for Ktor"
defaultTasks = mutableListOf("test")
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven(url = "https://dl.bintray.com/kotlin/ktor")
maven(url = "https://jitpack.io")
}
dependencies {
compile("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", Version.KOTLIN)
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-jdk8", Version.COROUTINES)
// Logging
implementation("io.github.microutils", "kotlin-logging", "1.6.20")
// Ktor
implementation("io.ktor", "ktor-server-core", Version.KTOR)
testCompile("io.ktor", "ktor-server-test-host", Version.KTOR)
// Junit
testCompile("org.junit.jupiter", "junit-jupiter-api", Version.JUNIT)
testRuntime("org.junit.jupiter", "junit-jupiter-engine", Version.JUNIT)
}
tasks {
test {
useJUnitPlatform()
// Show test results.
testLogging {
events("passed", "skipped", "failed")
}
reports {
junitXml.isEnabled = false
html.isEnabled = true
}
}
compileKotlin {
sourceCompatibility = Version.JVM
kotlinOptions {
jvmTarget = Version.JVM
}
}
wrapper {
description = "Generates gradlew[.bat] scripts for faster execution"
gradleVersion = "5.2.1"
}
}
publishing {
repositories {
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/mantono/${project.name}")
credentials {
username = "mantono"
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
register("gpr", MavenPublication::class) {
this.artifactId = project.name
this.groupId = project.group.toString()
this.version = project.version.toString()
from(components["java"])
}
}
}