2022-10-02 12:11:06 +02:00
|
|
|
import kafkatorio.conventions.overrideKotlinLanguageVersion
|
2021-10-30 20:24:58 +02:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
2021-10-10 20:20:01 +02:00
|
|
|
plugins {
|
2022-10-02 12:11:06 +02:00
|
|
|
id("kafkatorio.conventions.kotlin-dsl")
|
|
|
|
|
// idea
|
|
|
|
|
// `kotlin-dsl`
|
|
|
|
|
// kotlin("jvm") //version "1.7.20" // embeddedKotlinVersion
|
|
|
|
|
kotlin("plugin.serialization") version embeddedKotlinVersion
|
|
|
|
|
// kotlin("plugin.serialization") version "1.7.20"
|
2021-11-10 17:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
2022-10-02 12:11:06 +02:00
|
|
|
//val gradleJvmTarget = "11"
|
|
|
|
|
//val gradleKotlinTarget = "1.6"
|
2022-02-09 11:53:58 +01:00
|
|
|
|
|
|
|
|
|
2021-10-10 20:20:01 +02:00
|
|
|
dependencies {
|
2022-08-28 13:30:51 +02:00
|
|
|
implementation(platform(libs.kotlin.bom))
|
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")
|
2022-04-23 17:59:37 +02:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
|
2022-05-14 17:58:14 +02:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
|
2021-10-10 20:20:01 +02:00
|
|
|
|
2022-05-18 19:32:52 +02:00
|
|
|
implementation(platform(libs.kotlinx.coroutines.bom))
|
|
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
|
|
|
|
2022-09-11 00:48:16 +02:00
|
|
|
implementation(platform(libs.kotlinxSerialization.bom))
|
|
|
|
|
implementation(libs.kotlinxSerialization.core)
|
|
|
|
|
implementation(libs.kotlinxSerialization.json)
|
2021-12-22 22:45:56 +01:00
|
|
|
// implementation("com.charleskorn.kaml:kaml:0.37.0")
|
2021-11-28 18:11:39 +01:00
|
|
|
|
2022-05-14 17:58:14 +02:00
|
|
|
implementation("com.github.node-gradle:gradle-node-plugin:${libs.versions.gradleNodePlugin.get()}")
|
2022-02-09 11:53:58 +01:00
|
|
|
|
2022-08-28 13:30:51 +02:00
|
|
|
implementation(platform(libs.kotest.bom))
|
|
|
|
|
implementation("io.kotest:kotest-framework-multiplatform-plugin-gradle")
|
2022-02-09 11:53:58 +01:00
|
|
|
|
2022-05-14 17:58:14 +02:00
|
|
|
implementation("io.kvision:io.kvision.gradle.plugin:${libs.versions.kvision.get()}")
|
2021-12-08 21:15:16 +01:00
|
|
|
|
2022-05-14 17:58:14 +02:00
|
|
|
implementation("net.swiftzer.semver:semver:${libs.versions.semver.get()}")
|
2021-12-28 17:05:52 +01:00
|
|
|
|
2022-05-18 19:32:52 +02:00
|
|
|
implementation(platform(libs.okio.bom))
|
|
|
|
|
implementation(libs.okio.core)
|
|
|
|
|
|
|
|
|
|
implementation(gradleKotlinDsl())
|
|
|
|
|
|
|
|
|
|
implementation(libs.kotlinx.cli)
|
|
|
|
|
|
|
|
|
|
implementation(platform(libs.ktor.bom))
|
2022-07-01 13:14:32 +02:00
|
|
|
implementation(libs.ktorClient.auth)
|
|
|
|
|
implementation(libs.ktorClient.contentNegotiation)
|
|
|
|
|
implementation(libs.ktorClient.core)
|
|
|
|
|
implementation(libs.ktorClient.encoding)
|
|
|
|
|
implementation(libs.ktorClient.logging)
|
|
|
|
|
implementation(libs.ktorClient.cio)
|
|
|
|
|
implementation(libs.ktorClient.resources)
|
|
|
|
|
implementation(libs.ktorSerialization.kotlinxJson)
|
2022-05-18 19:32:52 +02:00
|
|
|
|
2021-12-28 17:05:52 +01:00
|
|
|
// https://github.com/avast/gradle-docker-compose-plugin
|
2022-05-14 17:58:14 +02:00
|
|
|
// implementation("com.avast.gradle:gradle-docker-compose-plugin:${Versions.gradleDockerComposePlugin}")
|
2022-02-13 10:42:13 +01:00
|
|
|
|
2022-03-09 21:40:40 +01:00
|
|
|
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
|
|
|
|
|
// https://youtrack.jetbrains.com/issue/IDEA-262280#focus=Comments-27-5397040.0-0
|
|
|
|
|
// implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
2021-10-10 20:20:01 +02:00
|
|
|
}
|
2021-10-30 20:24:58 +02:00
|
|
|
|
2021-11-10 17:34:01 +01:00
|
|
|
|
2022-04-23 17:59:37 +02:00
|
|
|
//tasks.compileKotlin {
|
|
|
|
|
// kotlinOptions {
|
|
|
|
|
// // needed by IntelliJ? Even though below does the same?
|
|
|
|
|
// languageVersion = "1.6"
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
2022-05-14 17:58:14 +02:00
|
|
|
tasks.withType<KotlinCompile>().configureEach {
|
2021-11-03 09:48:30 +01:00
|
|
|
|
|
|
|
|
kotlinOptions {
|
2022-10-02 12:11:06 +02:00
|
|
|
// jvmTarget = gradleJvmTarget
|
|
|
|
|
// apiVersion = gradleKotlinTarget
|
|
|
|
|
// languageVersion = gradleKotlinTarget
|
2021-11-03 09:48:30 +01:00
|
|
|
}
|
|
|
|
|
|
2021-10-30 20:24:58 +02:00
|
|
|
kotlinOptions.freeCompilerArgs += listOf(
|
2022-02-20 12:24:24 +01:00
|
|
|
// "-Xcontext-receivers",
|
2022-05-19 23:12:44 +02:00
|
|
|
"-opt-in=kotlin.RequiresOptIn",
|
|
|
|
|
"-opt-in=kotlin.ExperimentalStdlibApi",
|
|
|
|
|
"-opt-in=kotlin.time.ExperimentalTime",
|
2022-02-26 17:33:53 +01:00
|
|
|
// "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
2022-05-19 23:12:44 +02:00
|
|
|
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
2021-10-30 20:24:58 +02:00
|
|
|
)
|
2021-11-10 17:34:01 +01:00
|
|
|
}
|
|
|
|
|
|
2022-05-18 19:32:52 +02:00
|
|
|
|
2022-10-02 12:11:06 +02:00
|
|
|
overrideKotlinLanguageVersion("1.6")
|
|
|
|
|
//afterEvaluate {
|
|
|
|
|
// tasks.withType<KotlinCompile>().configureEach {
|
|
|
|
|
// kotlinOptions {
|
|
|
|
|
// apiVersion = gradleKotlinTarget
|
|
|
|
|
// languageVersion = gradleKotlinTarget
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
2021-11-10 17:34:01 +01:00
|
|
|
|
2022-10-02 12:11:06 +02:00
|
|
|
//kotlin {
|
|
|
|
|
// jvmToolchain {
|
|
|
|
|
// (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(gradleJvmTarget))
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//
|
|
|
|
|
//kotlinDslPluginOptions {
|
|
|
|
|
// jvmTarget.set(gradleJvmTarget)
|
|
|
|
|
//}
|
2021-11-10 17:34:01 +01:00
|
|
|
|
2022-10-02 12:11:06 +02:00
|
|
|
//idea {
|
|
|
|
|
// module {
|
|
|
|
|
// isDownloadSources = true
|
|
|
|
|
// isDownloadJavadoc = true
|
|
|
|
|
// }
|
|
|
|
|
//}
|