forked from papsign/Ktor-OpenAPI-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (57 loc) · 2.5 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
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
`maven-publish`
}
repositories {
mavenCentral()
}
val kotlinVersion = plugins.getPlugin(KotlinPluginWrapper::class.java).kotlinPluginVersion
val ktorVersion = findProperty("ktor_version")?.toString() ?: ""
val slf4jVersion = findProperty("slf4j_version")?.toString() ?: ""
val logVersion = findProperty("logback_version")?.toString() ?: ""
dependencies {
implementation(kotlin("stdlib", kotlinVersion))
implementation("org.slf4j:slf4j-api:$slf4jVersion")
testImplementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-host-common:$ktorVersion")
implementation("io.ktor:ktor-metrics:$ktorVersion")
implementation("io.ktor:ktor-server-sessions:$ktorVersion")
implementation("org.webjars:swagger-ui:3.47.1")
implementation("org.reflections:reflections:0.9.11") // only used while initializing
testImplementation("io.ktor:ktor-jackson:$ktorVersion") // needed for parameter parsing and multipart parsing
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8") // needed for multipart parsing
testImplementation("io.ktor:ktor-server-netty:$ktorVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion")
testImplementation("ch.qos.logback:logback-classic:$logVersion")
testImplementation("io.ktor:ktor-auth:$ktorVersion")
testImplementation("io.ktor:ktor-auth-jwt:$ktorVersion")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-Xuse-experimental=kotlin.ExperimentalStdlibApi")
}
}
publishing {
publications {
create<MavenPublication>("maven") {
group = "com.1gravity"
artifactId = "ktor-openapi-generator"
version = "0.2-beta.20"
from(components["java"])
pom {
name.set("Ktor OpenAPI Generator")
description.set("The Ktor OpenAPI Generator automatically generate the OpenAPI documentation based on the Ktor application routing definition")
packaging = "jar"
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
}
}