/
build.gradle
46 lines (39 loc) · 1.85 KB
/
build.gradle
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
/*
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
apply plugin: 'kotlin-multiplatform'
apply plugin: 'kotlinx-serialization'
apply from: rootProject.file("gradle/native-targets.gradle")
apply from: rootProject.file("gradle/configure-source-sets.gradle")
kotlin {
sourceSets {
jvmTest {
dependencies {
implementation 'io.kotlintest:kotlintest:2.0.7'
implementation 'com.google.guava:guava:24.1.1-jre'
implementation 'com.google.code.gson:gson:2.8.5'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
}
}
}
}
/*
These manifest values help kotlinx.serialization compiler plugin determine if it is compatible with a given runtime library.
Plugin reads them during compilation.
Implementation-Version is used to determine whether runtime library supports a given plugin feature (e.g. value classes serialization
in Kotlin 1.x may require runtime library version 1.y to work).
Compiler plugin may enable or disable features by looking on Implementation-Version.
Require-Kotlin-Version is used to determine whether runtime library with new features can work with old compilers.
In ideal case, its value should always be 1.4, but some refactorings (e.g. adding a method to the Encoder interface)
may unexpectedly break old compilers, so it is left out as a safety net. Compiler plugins, starting from 1.4 are instructed
to reject runtime if runtime's Require-Kotlin-Version is greater then the current compiler.
*/
tasks.withType(Jar).named(kotlin.jvm().artifactsTaskName) {
manifest {
attributes(
"Implementation-Version": version,
"Require-Kotlin-Version": "1.4.30-M1",
)
}
}
Java9Modularity.configureJava9ModuleInfo(project)