Kafkatorio/buildSrc/build.gradle.kts

120 lines
3.7 KiB
Text
Raw Normal View History

import kafkatorio.conventions.overrideKotlinLanguageVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("kafkatorio.conventions.kotlin-dsl")
id("kafkatorio.conventions.kotlin-serialization")
// idea
// `kotlin-dsl`
// kotlin("jvm") //version "1.7.20" // embeddedKotlinVersion
// kotlin("plugin.serialization") // version embeddedKotlinVersion
// kotlin("plugin.serialization") version "1.7.20"
}
//val gradleJvmTarget = "11"
//val gradleKotlinTarget = "1.6"
dependencies {
2022-08-28 13:30:51 +02:00
implementation(platform(libs.kotlin.bom))
2022-12-05 23:18:00 +01:00
implementation("org.jetbrains.kotlin:kotlin-serialization:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
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)
// implementation("com.charleskorn.kaml:kaml:0.37.0")
2021-11-28 18:11:39 +01:00
implementation("com.github.node-gradle:gradle-node-plugin:${libs.versions.gradleNodePlugin.get()}")
2022-08-28 13:30:51 +02:00
implementation(platform(libs.kotest.bom))
implementation("io.kotest:kotest-framework-multiplatform-plugin-gradle")
implementation("io.kvision:io.kvision.gradle.plugin:${libs.versions.kvision.get()}")
implementation("net.swiftzer.semver:semver:${libs.versions.semver.get()}")
2021-12-28 17:05:52 +01:00
implementation(platform(libs.okio.bom))
implementation(libs.okio.core)
implementation(gradleKotlinDsl())
implementation(libs.kotlinx.cli)
implementation(platform(libs.ktor.bom))
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)
2021-12-28 17:05:52 +01:00
// https://github.com/avast/gradle-docker-compose-plugin
// implementation("com.avast.gradle:gradle-docker-compose-plugin:${Versions.gradleDockerComposePlugin}")
// 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))
}
//tasks.compileKotlin {
// kotlinOptions {
// // needed by IntelliJ? Even though below does the same?
// languageVersion = "1.6"
// }
//}
tasks.withType<KotlinCompile>().configureEach {
2021-11-03 09:48:30 +01:00
kotlinOptions {
// jvmTarget = gradleJvmTarget
// apiVersion = gradleKotlinTarget
// languageVersion = gradleKotlinTarget
2021-11-03 09:48:30 +01:00
}
kotlinOptions.freeCompilerArgs += listOf(
// "-Xcontext-receivers",
"-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",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
)
}
overrideKotlinLanguageVersion("1.6")
//afterEvaluate {
// tasks.withType<KotlinCompile>().configureEach {
// kotlinOptions {
// apiVersion = gradleKotlinTarget
// languageVersion = gradleKotlinTarget
// }
// }
//}
//kotlin {
// jvmToolchain {
// (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(gradleJvmTarget))
// }
//}
//
//kotlinDslPluginOptions {
// jvmTarget.set(gradleJvmTarget)
//}
//idea {
// module {
// isDownloadSources = true
// isDownloadJavadoc = true
// }
//}