Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Spotless can format <antlr | c | c# | c++ | css | flow | graphql | groovy | h

You probably want one of the links below:

## [❇️ Spotless for Gradle](plugin-gradle) (with integrations for [VS Code](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle) and [IntelliJ](https://plugins.jetbrains.com/plugin/18321-spotless-gradle))
## [❇️ Spotless for Gradle](plugin-gradle) (with integrations for [VS Code](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle) and IntelliJ with [Spotless Daemon](https://plugins.jetbrains.com/plugin/29287-spotless-daemon) or [Spotless Gradle](https://plugins.jetbrains.com/plugin/18321-spotless-gradle))

```console
user@machine repo % ./gradlew build
Expand Down
23 changes: 23 additions & 0 deletions plugin-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ output = [
'',
link(shield('VS Code plugin', 'IDE', 'VS Code', 'blueviolet'), 'https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle'),
link(shield('IntelliJ plugin', 'IDE', 'IntelliJ', 'blueviolet'), 'https://plugins.jetbrains.com/plugin/18321-spotless-gradle'),
link(shield('Spotless Daemon plugin', 'IDE', 'Spotless Daemon', 'blueviolet'), 'https://plugins.jetbrains.com/plugin/29287-spotless-daemon'),
link(shield('Add other IDE', 'IDE', 'add yours', 'blueviolet'), 'IDE_HOOK.md')
].join('\n');
-->
Expand All @@ -20,9 +21,31 @@ output = [

[![VS Code plugin](https://img.shields.io/badge/IDE-VS_Code-blueviolet.svg)](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle)
[![IntelliJ plugin](https://img.shields.io/badge/IDE-IntelliJ-blueviolet.svg)](https://plugins.jetbrains.com/plugin/18321-spotless-gradle)
[![Spotless Daemon plugin](https://img.shields.io/badge/IDE-Spotless_Daemon-blueviolet.svg)](https://plugins.jetbrains.com/plugin/29287-spotless-daemon)
[![Add other IDE](https://img.shields.io/badge/IDE-add_yours-blueviolet.svg)](IDE_HOOK.md)
<!---freshmark /shields -->

Two IntelliJ plugins are available, with different trade-offs:

**[Spotless Daemon](https://plugins.jetbrains.com/plugin/29287-spotless-daemon)**

| | |
|:---|:---------------------------------------------------------------------------------------------------------|
| ✅ | Fast response — the Gradle daemon stays resident, so each format skips Gradle's startup and task execution |
| ✅ | Replaces the IDE's built-in formatter, so the formatting UX is identical to native reformat |
| ✅ | Includes targeted optimizations, e.g. import optimization is preprocessed on the IDE side |
| ❌ | The resident daemon holds some resources while running |
| ❌ | Implementation depends on some internal Gradle plugin structures rather than public integration APIs |

**[Spotless Gradle](https://plugins.jetbrains.com/plugin/18321-spotless-gradle)**

| | |
|:---|:---------------------------------------------------------------------------------------------------------|
| ✅ | Stable and battle-tested over years of use |
| ✅ | Works through the standard `spotlessApply` Gradle task integration |
| ❌ | Slow cold start — every invocation pays Gradle's startup cost |
| ❌ | Runs as a separate action, disconnected from the IDE's built-in format UX |

<!---freshmark javadoc
output = prefixDelimiterReplace(input, 'https://javadoc.io/doc/com.diffplug.spotless/spotless-plugin-gradle/', '/', versionLast)
-->
Expand Down