Skip to content

Commit

Permalink
chore: make spotless more useful
Browse files Browse the repository at this point in the history
  • Loading branch information
atomgomba committed Dec 13, 2024
1 parent 33e7a73 commit 7d9e63f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class BaselineProfileGenerator {
// The application id for the running build variant is read from the instrumentation arguments.
rule.collect(
packageName =
InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
// See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
includeInStartupProfile = true,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class StartupBenchmarks {
// The application id for the running build variant is read from the instrumentation arguments.
rule.measureRepeated(
packageName =
InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
metrics = listOf(StartupTimingMetric()),
compilationMode = compilationMode,
startupMode = StartupMode.COLD,
Expand Down
6 changes: 6 additions & 0 deletions gradle/spotless.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ rootProject {
target("**/*.kt")
targetExclude("**/build/**/*.kt")
ktlint()
.editorConfigOverride(
mapOf(
"ktlint_standard_property-naming" to "disabled",
"ktlint_function_naming_ignore_when_annotated_with" to "Composable",
)
)
}
format("kts") {
target("**/*.kts")
Expand Down

0 comments on commit 7d9e63f

Please sign in to comment.