xref: /aosp_15_r20/external/flatbuffers/kotlin/build.gradle.kts (revision 890232f25432b36107d06881e0a25aaa6b473652)

<lambda>null1 plugins {
2   id("com.diffplug.spotless") version "6.3.0"
3 }
4 
5 group = "com.google.flatbuffers"
6 version = "2.0.0-SNAPSHOT"
7 
<lambda>null8 buildscript {
9   repositories {
10     gradlePluginPortal()
11     google()
12     mavenCentral()
13   }
14   dependencies {
15     classpath(libs.bundles.plugins)
16   }
17 }
18 
<lambda>null19 allprojects {
20   repositories {
21     google()
22     mavenCentral()
23   }
24 }
25 
26 // plugin used to enforce code style
<lambda>null27 spotless {
28   val klintConfig = mapOf("indent_size" to "2", "continuation_indent_size" to "2")
29   kotlin {
30     target("**/*.kt")
31     ktlint("0.40.0").userData(klintConfig)
32     trimTrailingWhitespace()
33     indentWithSpaces()
34     endWithNewline()
35     licenseHeaderFile("$rootDir/spotless/spotless.kt").updateYearWithLatest(false)
36     targetExclude("**/spotless.kt", "**/build/**")
37   }
38   kotlinGradle {
39     target("*.gradle.kts")
40     ktlint().userData(klintConfig)
41   }
42 }
43