The plugin does not work when using Ktlint 0.46.0
See original GitHub issueThe Ktlint 0.46.0 has been released recently with breaking API changes that make using the plugin impossible. One such change is that Ktlint.Params class has been renamed into the ExperimentalParams.
As a result of this, when I run the ./gradlew ktlintCheck --continue
command, I get the following:
> Task :app:runKtlintCheckOverKotlinScripts FAILED
> Task :app:runKtlintCheckOverMainSourceSet FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintCheckOverKotlinScripts'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> com/pinterest/ktlint/core/KtLint$Params
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintCheckOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> com/pinterest/ktlint/core/KtLint$Params
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
10 actionable tasks: 3 executed, 7 up-to-date
The versions used are the following:
- ktlint-gradle:
10.3.0
- ktlint:
0.46.0
Issue Analytics
- State:
- Created a year ago
- Reactions:35
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Using with ktlint - Twitter Jetpack Compose Rules
Warning: This plugin doesn't currently support ktlint versions over 0.46.0, they are working to support it right now. If using ktlint-gradle, you can ......
Read more >ktlint changelog - Awesome Kotlin - LibHunt
Custom rule sets using the old RuleSetProvider interface will not be run in KtLint 0.48 or above. For now, it is advised to...
Read more >pinterest/ktlint 0.46.0 on GitHub - NewReleases.io
If your project did not run with the experimental ruleset enabled before, you might expect new lint violations to be reported.
Read more >com.pinterest.ktlint:ktlint-reporter-html 0.47.1 on Maven
Which means no decisions to make, nothing to argue about and no ... is to use a dedicated Maven plugin - gantsign/ktlint-maven-plugin.
Read more >Plugin: org.jlleitschuh.gradle.ktlint
Using the plugins DSL: plugins { id "org.jlleitschuh.gradle.ktlint" version "11.0.0" }. Using legacy plugin application:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please take this in the light-hearted spirit it is intended but: change all the things, issue a major version (semantic-version-wise) and sleep well at night 😃
Given how long this issue has been open and unresolved, is this something we could do? Create a 12.0.0 and just say that as of that version of this plugin, only ktlint 0.46.0 and newer are supported?