Skip to content

Apply Spotless plugin only to Kotlin projects - #7884

Merged
shakuzen merged 1 commit into
micrometer-metrics:1.16.xfrom
shakuzen:optimize-spotless-kotlin-only
Aug 26, 2026
Merged

shakuzen merged 1 commit into
micrometer-metrics:1.16.xfrom
shakuzen:optimize-spotless-kotlin-only

Conversation

@shakuzen

Copy link
Copy Markdown
Member

Summary

  • Moves apply plugin: 'com.diffplug.spotless' and spotless { kotlin { ... } } inside plugins.withId('org.jetbrains.kotlin.jvm').
  • Restricts Spotless tasks to the 2 modules containing Kotlin source code (micrometer-core and micrometer-samples-kotlin), removing redundant tasks from the other 50 Java-only modules.

Test plan

  • Verified ./gradlew :micrometer-core:spotlessCheck :micrometer-samples-kotlin:spotlessCheck executes and checks formatting properly.
  • Verified ./gradlew check --dry-run shows Spotless tasks registered only on :micrometer-core and :micrometer-samples-kotlin.
  • Verified full ./gradlew check -x test builds successfully.

@shakuzen shakuzen added type: task A general task build A change in our build-system labels Aug 26, 2026
@shakuzen shakuzen added this to the 1.16.8 milestone Aug 26, 2026
Only 2 subprojects contain Kotlin files (micrometer-core and
micrometer-samples-kotlin), while the remaining subprojects are pure Java
and formatted by Spring Java Format and Checkstyle.
Move Spotless plugin application and ktlint configuration into
plugins.withId('org.jetbrains.kotlin.jvm') to avoid evaluating and running
redundant Spotless tasks across 50 Java-only modules.
@shakuzen
shakuzen force-pushed the optimize-spotless-kotlin-only branch from 0e9f418 to e0ad0c9 Compare August 26, 2026 03:15
@shakuzen
shakuzen changed the base branch from main to 1.16.x August 26, 2026 03:15
@shakuzen
shakuzen merged commit bcb9b72 into micrometer-metrics:1.16.x Aug 26, 2026
11 checks passed
@shakuzen
shakuzen deleted the optimize-spotless-kotlin-only branch August 26, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build A change in our build-system type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant