-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
129 lines (98 loc) · 3.46 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion: String by System.getProperties()
val micronautPluginVersion: String by System.getProperties()
val dokkaVersion: String by System.getProperties()
id("io.micronaut.library") version micronautPluginVersion
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
kotlin("plugin.allopen") version kotlinVersion
id("org.jetbrains.dokka") version dokkaVersion
id("groovy")
id("maven-publish")
}
version = "0.1.5"
group = "org.microjservice.lark"
val jdkVersion: String by project
val micronautVersion: String by project
val micronautTestVersion: String by project
val jakartaAnnotationVersion: String by project
val jupiterEngineVersion: String by project
val mockkVersion: String by project
val kotestVersion: String by project
val dokkaVersion: String by System.getProperties()
micronaut {
version(micronautVersion)
runtime("jetty")
// runtime("netty")
}
repositories {
mavenCentral()
}
dependencies {
kapt(platform("io.micronaut:micronaut-bom:$micronautVersion"))
kapt("io.micronaut:micronaut-inject-java")
kaptTest("io.micronaut:micronaut-inject-java")
testAnnotationProcessor("io.micronaut", "micronaut-inject-java")
dokkaHtmlPlugin("org.jetbrains.dokka", "kotlin-as-java-plugin", dokkaVersion)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
compileOnly("io.micronaut:micronaut-http-server-netty")
implementation("io.micronaut:micronaut-http-server")
implementation("io.micronaut", "micronaut-http-client")
implementation("jakarta.inject", "jakarta.inject-api", jakartaAnnotationVersion)
implementation("com.github.javafaker:javafaker:1.0.2")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
// implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.+")
implementation("io.github.microutils:kotlin-logging-jvm:2.0.6")
testImplementation("io.micronaut.test:micronaut-test-spock")
testImplementation("org.spockframework:spock-core") {
exclude("org.codehaus.groovy", "groovy-all")
}
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("io.micronaut.test", "micronaut-test-junit5", micronautTestVersion)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", jupiterEngineVersion)
testImplementation("io.micronaut.test", "micronaut-test-kotest")
testImplementation("io.mockk", "mockk", mockkVersion)
testImplementation("io.kotest", "kotest-runner-junit5-jvm", kotestVersion)
// implementation(kotlin("stdlib-jdk8"))
}
tasks.withType<Test> {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.toVersion(jdkVersion)
withJavadocJar()
withSourcesJar()
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = jdkVersion
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = jdkVersion
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
mavenLocal()
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}