2021-12-28 16:26:23 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
2021-10-22 18:19:53 +02:00
|
|
|
plugins {
|
2022-01-16 23:16:09 +01:00
|
|
|
dev.adamko.kafkatorio.lang.`kotlin-jvm`
|
2021-10-25 23:35:47 +02:00
|
|
|
kotlin("plugin.serialization")
|
2021-10-24 14:55:04 +02:00
|
|
|
application
|
2021-10-22 18:19:53 +02:00
|
|
|
}
|
|
|
|
|
|
2021-12-01 13:35:32 +01:00
|
|
|
description = """
|
2021-10-22 18:19:53 +02:00
|
|
|
Receive raw Factorio Events from Kafka and process them into targeted topics or data formats.
|
|
|
|
|
|
|
|
|
|
Factorio events -> Mod -> Kafka -> ***Factorio Events Processor*** -> processed events
|
|
|
|
|
""".trimIndent()
|
|
|
|
|
|
|
|
|
|
val projectId: String by project.extra
|
|
|
|
|
|
2021-12-27 12:44:37 +01:00
|
|
|
@Suppress("UnstableApiUsage") // platform + version-catalog is incubating
|
2021-10-24 14:55:04 +02:00
|
|
|
dependencies {
|
|
|
|
|
|
2022-02-06 21:05:37 +01:00
|
|
|
implementation("org.apache.kafka:kafka-streams:3.1.0")
|
2021-10-24 14:55:04 +02:00
|
|
|
|
2021-12-01 16:57:46 +01:00
|
|
|
implementation(projects.modules.eventsSchema)
|
2021-12-01 13:35:32 +01:00
|
|
|
|
|
|
|
|
// implementation("com.ionspin.kotlin:bignum:0.3.3")
|
|
|
|
|
|
2021-12-27 12:44:37 +01:00
|
|
|
implementation(platform(libs.kotlinx.serialization.bom))
|
2021-12-01 13:35:32 +01:00
|
|
|
implementation(libs.kotlinx.serialization.core)
|
|
|
|
|
implementation(libs.kotlinx.serialization.json)
|
2022-01-21 18:31:15 +01:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf")
|
2021-10-25 23:35:47 +02:00
|
|
|
|
2021-12-27 12:44:37 +01:00
|
|
|
implementation(libs.kotlinx.coroutines)
|
|
|
|
|
|
2021-10-24 14:55:04 +02:00
|
|
|
implementation(platform(libs.http4k.bom))
|
2021-12-28 16:26:23 +01:00
|
|
|
implementation(libs.bundles.http4k)
|
2021-12-01 13:35:32 +01:00
|
|
|
implementation(libs.http4k.format.kotlinx)
|
2021-10-24 14:55:04 +02:00
|
|
|
|
|
|
|
|
implementation(libs.bundles.logging)
|
2022-01-13 00:00:59 +01:00
|
|
|
|
|
|
|
|
implementation("com.sksamuel.scrimage:scrimage-core:4.0.24")
|
2022-01-16 23:16:09 +01:00
|
|
|
|
2022-02-06 21:05:37 +01:00
|
|
|
val kotkaVersion = "v0.0.12"
|
|
|
|
|
// val kotkaVersion = "store-iterators-SNAPSHOT"
|
2022-01-16 23:16:09 +01:00
|
|
|
implementation("com.github.adamko-dev.kotka-streams:kotka-streams:$kotkaVersion") {
|
|
|
|
|
isChanging = true
|
|
|
|
|
}
|
|
|
|
|
// val kotkaVersion = "main-SNAPSHOT"
|
|
|
|
|
// implementation("dev.adamko.kotka:kotka-streams:$kotkaVersion") {
|
|
|
|
|
// isChanging = true
|
|
|
|
|
// }
|
|
|
|
|
|
2021-10-24 14:55:04 +02:00
|
|
|
}
|
|
|
|
|
|
2022-02-05 12:20:25 +01:00
|
|
|
//configurations.all {
|
|
|
|
|
// resolutionStrategy.cacheDynamicVersionsFor(1, TimeUnit.MINUTES)
|
|
|
|
|
//}
|
|
|
|
|
|
2021-10-24 14:55:04 +02:00
|
|
|
application {
|
2022-01-09 11:05:30 +01:00
|
|
|
mainClass.set("dev.adamko.kafkatorio.processor.EventProcessorKt")
|
2021-10-24 14:55:04 +02:00
|
|
|
}
|
2021-12-28 16:26:23 +01:00
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
|
kotlinOptions.freeCompilerArgs += listOf(
|
|
|
|
|
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
2022-02-05 12:20:25 +01:00
|
|
|
"-opt-in=kotlinx.coroutines.FlowPreview",
|
2021-12-28 16:26:23 +01:00
|
|
|
)
|
|
|
|
|
}
|