-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle.kts
67 lines (55 loc) · 2.14 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
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
/*
this could be a pure-jvm module, but there are some dependency issues
https://stackoverflow.com/questions/65830632/cant-access-commonmain-multiplatform-classes-from-a-jvm-only-module
*/
kotlin("multiplatform") version libs.versions.kotlin
id("java-library")
id("maven-publish")
id("com.futuremind.koru.publish")
}
kotlin {
//this is only used as kapt / ksp (annotation processor, so pure jvm)
jvm {
val main by compilations.getting {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
sourceSets {
val jvmMain by getting {
dependencies {
implementation(project(":koru"))
//code generation
val kotlinpoetVersion = "1.12.0"
implementation("com.squareup:kotlinpoet:$kotlinpoetVersion")
implementation("com.squareup:kotlinpoet-metadata:$kotlinpoetVersion")
implementation("com.squareup:kotlinpoet-ksp:$kotlinpoetVersion")
implementation(libs.coroutines)
implementation(libs.ksp)
}
}
val jvmTest by getting {
dependencies {
val junitVersion = "5.8.2"
val compileTestingVersion = "1.4.9"
implementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
runtimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
implementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
implementation("com.github.tschuchortdev:kotlin-compile-testing:$compileTestingVersion")
implementation("com.github.tschuchortdev:kotlin-compile-testing-ksp:$compileTestingVersion")
implementation("io.kotest:kotest-assertions-core:4.6.3")
}
}
}
}
koruPublishing {
pomName = "Koru - Processor"
pomDescription = "Wrappers for suspend functions / Flow in Kotlin Native - annotation processor."
}
//otherwise junit5 tests cannot be run from jvmTest
tasks.withType<Test> {
useJUnitPlatform()
}