All notable changes to this project will be documented in this file. The format is based on Keep a Changelog v1.0.0, and this project adheres to Semantic Versioning v2.0.0.
- A new configuration nested object
ktlint.lint
with the propertyfailOnErrors
and the functiondisableFailOnErrors()
- A new configuration property
ktlint.gitPreCommitHook.abortOnErrors
and functiondisableAbortOnErrors()
- A new configuration DSL syntax:
- The nested object
ktlint.flags
- The field
ktlint.flags.codeStyle
- The field
ktlint.flags.limit
- The field
ktlint.flags.experimental
- The function
ktlint.enableExperimental()
- The field
- The nested object
ktlint.gitPreCommitHook
- The nested object
ktlint.gitPreCommitHook.installOnBuild
- The function
ktlint.gitPreCommitHook.enableInstallOnBuild()
- The nested object
- The nested object
- If the ktlint version is set to
1.1.0
or greater and experimental rules are enabled the configuration will fail - If the ktlint version is set to
1.1.0
or greater and the code style is explicitly set then the configuration will fail - If the configuration
ktlint.gitPreCommitHook.installOnBuild
is set totrue
, then the Git pre-commit hook installation task will be made a dependency of the tasksassemble
,preBuild
andbuild
.
If none of those tasks exist, then the configuration will fail
- The configuration property
ktlint.flags.codeStyle
is deprecated to mirror removal of the flag--code-style
in ktlint version1.1.0
- The configuration property
ktlint.flags.experimental
is deprecated to mirror removal of the flag--experimental
in ktlint version1.1.0
- The old configuration DSL syntax is now deprecated. That includes:
- The field
ktlint.codeStyle
- The field
ktlint.limit
- The field
ktlint.experimental
- The function
ktlint.enableExperimental()
- The field
ktlint.installGitPreCommitHookBeforeBuild
- The field
v0.1.0-indev09 - 2024-03-01
- The ktlint version
1.2.0
is rejected because it contains a bug that breaks the behavior of the Git pre-commit hook script
v0.1.0-indev08 - 2023-10-28
- A new experimental task class
KtlintFormattingTask
that formats Kotlin source files
v0.1.0-indev07 - 2023-10-24
- The task
installKtlintGitPreCommitHook
is now cacheable - The option
--color
is added to the ktlint invocation (can be disabled withNO_COLOR
)
- The minimum supported version of ktlint is now
0.50.0
- The configuration property
experimentalRulesEnabled
was renamed to justexperimental
(to mirror the name of the actual ktlint flag--experimental
)
- The
android
configuration property (which was deprecated in version 0.1.0-indev04) has been removed
v0.1.0-indev06 - 2023-09-11
- Support for ktlint version
1.0.0
+
v0.1.0-indev05 - 2023-06-14
- New
experimentalRulesEnabled
configuration property for adding the--experimental
flag to the ktlint invocation- Convenience function
enableExperimentalRules()
- Convenience function
- The Java compatibility is now explicitly set to
11
(before it was implicitly17
)
v0.1.0-indev04 - 2023-05-04
- The hook will now also print the configured ktlint version
- New
limit
configuration property for adding the--limit=<limit>
flag to the ktlint invocation - New
codeStyle
configuration property for adding the--code-stye=<codeStyle>
flag to the ktlint invocation
- The
android
configuration property to mirror the deprecation of the--android
flag
v0.1.0-indev03 - 2023-04-19
- New
android
boolean configuration property (ad2a302
)
v0.1.0-indev02 - 2023-04-19
- Fixed the
installKtlintGitPreCommitHook
task (4db95eb
)
v0.1.0-indev01 - 2023-04-14
Initial Release