Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NoClassDefFoundError's after update to gradle-plugin v8.5.1

Open
#2,933 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java, kotlin

Research direction

Reproduce the update from gradle-plugin v8.5.0 to v8.5.1 using the reported MediaTypes.kt content and inspect the ktlint NoClassDefFoundError for EditorConfigDefaults. Compare the formatter behavior between versions; done means Kotlin files without Kotlin classes no longer produce this error.

Written by the indexing model from the issue text.

Description

after update from gradle-plugin v8.5.0 to v8.5.1, I get errors for Kotlin files which don't contain any Kotlin classes.

Log output is:

...
.../MediaTypes.kt:LINE_UNDEFINED ktlint(java.lang.NoClassDefFoundError) com/pinterest/ktlint/rule/engine/api/EditorConfigDefaults (...)
...

The example file MediaTypes.kt has this content:

package xyz

const val MEDIA_TYPE_WORD = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.