GeezerVison is showing github.com — Fix the Android Kotlin warning and adjust its position. · diffplug/spotless@60993fd
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: plugin-gradle/README.md +10-13Lines changed: 10 additions & 13 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -435,19 +435,6 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T |
435 | 435 | - `com.diffplug.gradle.spotless.KotlinExtension` [javadoc](https://javadoc.io/doc/com.diffplug.spotless/spotless-plugin-gradle/7.0.2/com/diffplug/gradle/spotless/KotlinExtension.html), [code](https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/KotlinExtension.java) |
436 | 436 | - `com.diffplug.gradle.spotless.KotlinGradleExtension` [javadoc](https://javadoc.io/doc/com.diffplug.spotless/spotless-plugin-gradle/7.0.2/com/diffplug/gradle/spotless/KotlinGradleExtension.html), [code](https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/KotlinGradleExtension.java) |
437 | 437 |
|
438 | | -> [!WARNING] |
439 | | -> The target is usually inferred automatically from the java source sets. However, Spotless cannot automatically detect [android](https://github.com/diffplug/spotless/issues/111) or [java-gradle-plugin](https://github.com/diffplug/spotless/issues/437) sources, but you can fix this easily: |
440 | | -> |
441 | | -> ```gradle |
442 | | -> spotless { |
443 | | -> kotlin { |
444 | | -> target 'src/*/kotlin/**/*.kt' |
445 | | -> target 'src/*/java/**/*.kt' |
446 | | -> } |
447 | | -> kotlinGradle { |
448 | | -> target '**/*.kts' |
449 | | -> } |
450 | | -> ``` |
451 | 438 |
|
452 | 439 | ```gradle |
453 | 440 | spotless { // if you are using build.gradle.kts, instead of 'spotless {' use: |
@@ -467,6 +454,16 @@ spotless { // if you are using build.gradle.kts, instead of 'spotless {' use: |
467 | 454 | } |
468 | 455 | ``` |
469 | 456 |
|
| 457 | +> [!WARNING] |
| 458 | +> The target is usually inferred automatically from the java source sets. However, Spotless cannot automatically detect [android](https://github.com/diffplug/spotless/issues/111) or [java-gradle-plugin](https://github.com/diffplug/spotless/issues/437) sources, but you can fix this easily: |
| 459 | +> |
| 460 | +> ```gradle |
| 461 | +> spotless { |
| 462 | +> kotlin { |
| 463 | +> target 'src/*/kotlin/**/*.kt', 'src/*/java/**/*.kt' |
| 464 | +> ... |
| 465 | +> ``` |
| 466 | +
|
470 | 467 | ### ktfmt |
471 | 468 |
|
472 | 469 | [homepage](https://github.com/facebook/ktfmt). [changelog](https://github.com/facebook/ktfmt/releases). |
|