- 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
|
|
@ -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