gantsign / ktlint-maven-plugin

Maven plugin for ktlint the Kotlin linter

Home Page:http://gantsign.com/ktlint-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maven plugin fails with 1.14.0

binkley opened this issue · comments

I waited to post this issue to see if it would get resolved. All my Kotlin projects trying 1.14.0 fail but pass with 1.13.1.

This failure mode is consistent for me across projects:

A type incompatibility occurred while executing com.github.gantsign.maven:ktlint-maven-plugin:1.14.0:format: class java.lang.String cannot be cast to class com.pinterest.ktlint.core.api.DefaultEditorConfigProperties$CodeStyleValue (java.lang.String is in module java.base of loader 'bootstrap'; com.pinterest.ktlint.core.api.DefaultEditorConfigProperties$CodeStyleValue is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @75361cf6)

Java 17 is common among the projects, if relevant. (I don't have a sample project to check differential behavior between JDK 11 and 17 with plugin version 1.14.0).

1.15.0 of this plugin is working for me, and I no longer see the above error.

In case it is helpful for others, here is the setup I am using:

  • JDK: Temurin 17 current (17.0.3)
  • Maven: 3.8.4
  • Kotlin: 1.7.10

@binkley thanks for reporting this issue and that it was resolved by version 1.15.0.