diff --git a/build.gradle.kts b/build.gradle.kts index cce1cab38..18bc20139 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,6 +10,7 @@ repositories { plugins { base alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.spotless) } java { @@ -66,3 +67,9 @@ kotlin { val nativeTest by getting } } + +spotless { + kotlin { + ktfmt().googleStyle() + } +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a478544ef..6cf872df3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,9 +2,11 @@ arrow = "1.2.0-RC" kotlin = "1.8.20" openai = "0.12.0" +spotless = "6.18.0" [libraries] arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrow" } open-ai = { module = "com.theokanning.openai-gpt3-java:service", version.ref = "openai" } [plugins] kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }