-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
83 lines (68 loc) · 2.08 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
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
val kotlinVersion by extra("1.9.20")
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
val kotlinVersion by extra("1.9.20")
val kotestVersion by extra("5.5.5")
plugins {
val kotlinVersion by extra("1.9.20")
kotlin("jvm") version "1.9.20"
`java-library`
}
apply(plugin = "kotlin")
defaultTasks("clean", "build")
repositories {
mavenCentral()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "11"
kotlinOptions.allWarningsAsErrors = false
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
testImplementation("io.mockk:mockk:1.12.0")
testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
implementation("io.kotest:kotest-assertions-core-jvm:$kotestVersion")
implementation("io.kotest:kotest-property-jvm:$kotestVersion")
implementation("io.kotest:kotest-framework-datatest:$kotestVersion")
testImplementation("io.kotest:kotest-runner-console:4.1.3.2")
}
sourceSets {
test {
withConvention(KotlinSourceSet::class) {
kotlin.srcDir(file("src/test/kotlin/unit"))
resources.srcDir("src/test/resources")
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
javaParameters = true
allWarningsAsErrors = false
}
}
fun getProp(propName: String) : String {
return when(project.hasProperty(propName)) {
true -> project.property(propName) as String
false -> ""
}
}
configurations{
all {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7")
}
}