question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The plugin does not work when using Ktlint 0.46.0

See original GitHub issue

The 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:open
  • Created a year ago
  • Reactions:35
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
mikehardycommented, Aug 19, 2022

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 😃

10reactions
scottkennedycommented, Nov 17, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found