Skip to content

Commit 48e9d98

Browse files
committed
Use spotless in buildSrc
1 parent 4a1c73b commit 48e9d98

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

buildSrc/build.gradle.kts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414

1515
plugins {
16-
id("com.ncorti.ktfmt.gradle") version "0.20.1"
1716
alias(libs.plugins.kotlinx.serialization)
17+
alias(libs.plugins.spotless)
1818
`kotlin-dsl`
1919
}
2020

@@ -26,15 +26,23 @@ repositories {
2626
maven(url = "https://plugins.gradle.org/m2/")
2727
}
2828

29+
spotless {
30+
java {
31+
target("src/**/*.java")
32+
targetExclude("**/test/resources/**")
33+
googleJavaFormat("1.22.0").reorderImports(false).skipJavadocFormatting()
34+
}
35+
kotlin {
36+
target("src/**/*.kt")
37+
ktfmt("0.52").googleStyle()
38+
}
39+
}
40+
2941
// Refer latest "perf-plugin" released version on https://maven.google.com/web/index.html?q=perf-plugin#com.google.firebase:perf-plugin
3042
// The System property allows us to integrate with an unreleased version from https://bityl.co/3oYt.
3143
// Refer go/fireperf-plugin-test-on-head for more details.
3244
val perfPluginVersion = System.getenv("FIREBASE_PERF_PLUGIN_VERSION") ?: "1.4.1"
3345

34-
ktfmt {
35-
googleStyle()
36-
}
37-
3846
dependencies {
3947
// Firebase performance plugin, it should be added here because of how gradle dependency
4048
// resolution works, otherwise it breaks Fireperf Test Apps.

0 commit comments

Comments
 (0)