- version bumps for coroutines, gradle, kotlin
- refactor kafka-connector project, prepping for the connector-admin
This commit is contained in:
parent
7cd630500e
commit
45189dddc2
20 changed files with 3408 additions and 124 deletions
|
|
@ -3,13 +3,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|||
plugins {
|
||||
idea
|
||||
`kotlin-dsl`
|
||||
kotlin("jvm") version "1.6.0"
|
||||
kotlin("jvm") version "1.6.10"
|
||||
`project-report`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
val kotlinVersion = "1.6.0"
|
||||
val kotlinVersion = "1.6.10"
|
||||
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
|
||||
implementation("org.jetbrains.kotlin:kotlin-serialization")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||
|
|
@ -19,7 +19,7 @@ dependencies {
|
|||
implementation(enforcedPlatform("org.jetbrains.kotlinx:kotlinx-serialization-bom:$kotlinXSerializationVersion"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json")
|
||||
|
||||
// implementation("com.charleskorn.kaml:kaml:0.37.0")
|
||||
|
||||
implementation("com.github.node-gradle:gradle-node-plugin:3.1.1")
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ tasks.withType<KotlinCompile>().configureEach {
|
|||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-Xopt-in=kotlin.time.ExperimentalTime",
|
||||
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencyResolutionManagement {
|
||||
|
||||
|
|
@ -13,7 +12,7 @@ dependencyResolutionManagement {
|
|||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven("https://jitpack.io")
|
||||
jitpack()
|
||||
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
|
||||
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
|
||||
|
||||
|
|
@ -35,11 +34,16 @@ dependencyResolutionManagement {
|
|||
pluginManagement {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
jitpack()
|
||||
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun RepositoryHandler.jitpack() {
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package dev.adamko.kafkatorio
|
|||
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
|
||||
val jsonMapper = Json {
|
||||
prettyPrint = true
|
||||
prettyPrintIndent = " "
|
||||
|
|
|
|||
|
|
@ -8,23 +8,26 @@ plugins {
|
|||
|
||||
val dockerComposeTaskGroup: String by extra("docker-compose")
|
||||
|
||||
val composeProjectName: String by extra(rootProject.name)
|
||||
val srcDir: Directory by extra(layout.projectDirectory.dir("src"))
|
||||
val dockerComposeProjectName: String by extra(rootProject.name)
|
||||
val dockerSrcDir: Directory by extra(layout.projectDirectory.dir("src"))
|
||||
|
||||
|
||||
val dockerUp by tasks.creating(Exec::class) {
|
||||
val dockerUp by tasks.registering(Exec::class) {
|
||||
group = dockerComposeTaskGroup
|
||||
|
||||
dependsOn(tasks.assemble)
|
||||
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||
|
||||
workingDir = srcDir.asFile
|
||||
workingDir = dockerSrcDir.asFile
|
||||
commandLine = parseSpaceSeparatedArgs(""" docker-compose up -d """)
|
||||
}
|
||||
|
||||
val dockerDown by tasks.creating(Exec::class) {
|
||||
val dockerDown by tasks.registering(Exec::class) {
|
||||
group = dockerComposeTaskGroup
|
||||
|
||||
workingDir = srcDir.asFile
|
||||
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||
|
||||
workingDir = dockerSrcDir.asFile
|
||||
commandLine = parseSpaceSeparatedArgs(""" docker-compose down """)
|
||||
}
|
||||
|
||||
|
|
@ -36,9 +39,11 @@ afterEvaluate {
|
|||
val dockerEnv by tasks.registering(WriteProperties::class) {
|
||||
group = dockerComposeTaskGroup
|
||||
|
||||
setOutputFile(srcDir.file(".env"))
|
||||
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||
|
||||
setOutputFile(dockerSrcDir.file(".env"))
|
||||
properties(
|
||||
"COMPOSE_PROJECT_NAME" to composeProjectName,
|
||||
"COMPOSE_PROJECT_NAME" to dockerComposeProjectName,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ kotlin {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
val kotlinWrappersVersion = "0.0.1-pre.270-kotlin-1.6.0"
|
||||
val kotlinWrappersVersion = "0.0.1-pre.276-kotlin-1.6.0"
|
||||
implementation(
|
||||
project.dependencies.enforcedPlatform(
|
||||
"org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package dev.adamko.kafkatorio.lang
|
||||
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.kotlin
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
|
|
@ -29,11 +27,12 @@ dependencies {
|
|||
|
||||
val junitVersion = "5.8.2"
|
||||
testImplementation(enforcedPlatform("org.junit:junit-bom:$junitVersion"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
|
||||
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
|
||||
}
|
||||
|
||||
val kotestVersion = "5.0.1"
|
||||
val kotestVersion = "5.0.3"
|
||||
testImplementation(enforcedPlatform("io.kotest:kotest-bom:$kotestVersion"))
|
||||
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
|
||||
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
|
||||
|
|
@ -58,11 +57,15 @@ tasks.withType<KotlinCompile>().configureEach {
|
|||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-Xopt-in=kotlin.time.ExperimentalTime",
|
||||
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
)
|
||||
}
|
||||
|
||||
tasks.compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs += "-Xopt-in=io.kotest.common.ExperimentalKotest"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue