-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ktlint 1.0 support #708
ktlint 1.0 support #708
Conversation
@@ -2,7 +2,7 @@ pluginManagement { | |||
val latestRelease = file("VERSION_LATEST_RELEASE.txt").readText().trim() | |||
plugins { | |||
id("org.jlleitschuh.gradle.ktlint") version latestRelease | |||
id("org.jetbrains.kotlin.jvm") version "1.7.21" | |||
id("org.jetbrains.kotlin.jvm") version "1.9.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have to upgrade because ktlint did (to support context receivers)
6ba65c3
to
89cd401
Compare
3a2318f
to
26a2e87
Compare
26a2e87
to
ceb5923
Compare
} | ||
|
||
private fun resolveGroup(ktlintVersion: String) = when { | ||
SemVer.parse(ktlintVersion) < SemVer(0, 32, 0) -> "com.github.shyiko" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont support 0.32 anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can note
Change default code style to ktlint_official
in changelog, if someone is upgrading from the old versions, may need to override the style like ktlint_code_style = intellij_idea
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@wakingrufus @JLLeitschuh when are you planing to generate a new version? |
ceb5923
to
ca03b66
Compare
This is only true based on which ktlint version you are selecting right? the default is still 0.47.1 |
Yeah, before 1.0.0 the default style is |
Allow editorconfig overrides in ktlint 0.49+ (fixes #707) using pinterest/ktlint#2194
ca03b66
to
dd736e2
Compare
I think this will be important to note when we change the default to 1.0, but for now, this will not be imposed on anyone who is not explicitly upgrading. We also currently note:
in the README.md as well, but I will improve that to point to the ktlint release notes for reference. |
The reason I am hesitant to get overly verbose here, is that there are MANY changes in behavior between ktlint versions, many of which are just changes in the underlying implementation that has no impact on the plugin itself. I do not want to set an expectation that we will be documenting these: it is up to the user to determine which version of ktlint to use and when to upgrade. All the documentation needed for this is provided by the ktlint project. |
Ktlint 1.0 support (fixes #706)
Allow editorconfig overrides in ktlint 0.49+ (fixes #707) using pinterest/ktlint#2194