2021-10-30 20:24:58 +02:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
2021-10-10 20:20:01 +02:00
|
|
|
plugins {
|
2021-11-10 17:34:01 +01:00
|
|
|
idea
|
2021-10-10 20:20:01 +02:00
|
|
|
`kotlin-dsl`
|
2021-11-26 14:30:06 +01:00
|
|
|
kotlin("jvm") version "1.6.0"
|
2021-12-01 13:35:32 +01:00
|
|
|
`project-report`
|
2021-11-10 17:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
2021-10-10 20:20:01 +02:00
|
|
|
dependencies {
|
|
|
|
|
|
2021-11-26 14:30:06 +01:00
|
|
|
val kotlinVersion = "1.6.0"
|
2021-12-01 13:35:32 +01:00
|
|
|
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
|
2021-10-25 23:23:28 +02:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-serialization")
|
2021-11-28 18:11:39 +01:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
2021-12-02 00:54:15 +01:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
2021-10-10 20:20:01 +02:00
|
|
|
|
2021-11-28 18:11:39 +01:00
|
|
|
val kotlinXSerializationVersion = "1.3.1"
|
2021-12-01 13:35:32 +01:00
|
|
|
implementation(enforcedPlatform("org.jetbrains.kotlinx:kotlinx-serialization-bom:$kotlinXSerializationVersion"))
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core")
|
2021-11-28 18:11:39 +01:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json")
|
|
|
|
|
|
|
|
|
|
|
2021-10-10 20:20:01 +02:00
|
|
|
implementation("com.github.node-gradle:gradle-node-plugin:3.1.1")
|
|
|
|
|
}
|
2021-10-30 20:24:58 +02:00
|
|
|
|
2021-11-10 17:34:01 +01:00
|
|
|
val projectJvmTarget = "11"
|
|
|
|
|
|
2021-10-30 20:24:58 +02:00
|
|
|
tasks.withType<KotlinCompile>().configureEach {
|
2021-11-03 09:48:30 +01:00
|
|
|
|
|
|
|
|
kotlinOptions {
|
2021-11-10 17:34:01 +01:00
|
|
|
jvmTarget = projectJvmTarget
|
2021-11-26 14:30:06 +01:00
|
|
|
apiVersion = "1.6"
|
|
|
|
|
languageVersion = "1.6"
|
2021-11-03 09:48:30 +01:00
|
|
|
}
|
|
|
|
|
|
2021-10-30 20:24:58 +02:00
|
|
|
kotlinOptions.freeCompilerArgs += listOf(
|
2021-11-10 17:34:01 +01:00
|
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
2021-10-30 20:24:58 +02:00
|
|
|
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
|
|
|
|
"-Xopt-in=kotlin.time.ExperimentalTime",
|
|
|
|
|
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
2021-11-10 17:34:01 +01:00
|
|
|
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
2021-10-30 20:24:58 +02:00
|
|
|
)
|
2021-11-10 17:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
|
jvmToolchain {
|
|
|
|
|
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(projectJvmTarget))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlinDslPluginOptions {
|
|
|
|
|
jvmTarget.set(projectJvmTarget)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
idea {
|
|
|
|
|
module {
|
|
|
|
|
isDownloadSources = true
|
|
|
|
|
isDownloadJavadoc = true
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-01 13:35:32 +01:00
|
|
|
|
2021-12-06 22:15:26 +01:00
|
|
|
//tasks.assemble { dependsOn(tasks.htmlDependencyReport) }
|