Skip to content
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

Update all dependencies #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 8, 2020

This PR contains the following updates:

Package Type Update Change Age Adoption Passing Confidence
gradle (source) minor 6.4.1 -> 6.9.4 age adoption passing confidence
com.pinterest:ktlint dependencies minor 0.36.0 -> 0.51.0-FINAL age adoption passing confidence
org.jsoup:jsoup (source) dependencies minor 1.13.1 -> 1.18.3 age adoption passing confidence
org.jetbrains.kotlin.plugin.spring plugin minor 1.3.61 -> 1.9.25 age adoption passing confidence
org.jetbrains.kotlin.jvm plugin minor 1.3.61 -> 1.9.25 age adoption passing confidence
io.spring.dependency-management plugin minor 1.0.9.RELEASE -> 1.1.7 age adoption passing confidence

Release Notes

gradle/gradle (gradle)

v6.9.4: 6.9.4

Compare Source

This is a patch release for 6.9. We recommend using 6.9.4 instead of 6.9.

It fixes the following issues:

  • #​23680 Dependency graph resolution: Equivalent excludes can cause un-necessary graph mutations [backport 6.x]
  • #​23945 Backport trusting only full GPG keys in dependency verification [Backport 6.9.4]
  • #​23950 Exclude rule merging: missing optimization [backport 6.x]

Read the Release Notes

Upgrade Instructions

Switch your build to use Gradle 6.9.4 by updating your wrapper:

./gradlew wrapper --gradle-version=6.9.4

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.9.4.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.9.3: 6.9.3

Compare Source

This is a patch release for Gradle 6.9, containing backported bugfixes in Gradle 7.x to Gradle 6.x.

It fixes the following issues:

  • #​19523 Fix buffer overflow error in KryoBackedDecoder [Backport 6.x]
  • #​20189 Support constraints without version in GMM [Backport 6.9.x]
  • #​22358 Missing exclude rule merging optimizations

We recommend users upgrade to 6.9.3 instead of 6.9.

Upgrade Instructions

Switch your build to use Gradle 6.9.3 by updating your wrapper:

./gradlew wrapper --gradle-version=6.9.3

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.9.3.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.9.2: 6.9.2

Compare Source

This is a patch release for Gradle 6.9, containing backported bugfixes in Gradle 7.2 to Gradle 6.x.

It fixes the following issues:

  • #​18163 Fix excludes for substituted dependencies
  • #​18164 POSIX shell scripts improvements
  • #​18697 Fix corrupted resolution result from replacement / capability conflict
  • #​19328 Mitigations for log4j vulnerability in Gradle builds
  • #​19372 Multiple transformed artifacts selected

We recommend users upgrade to 6.9.2 instead of 6.9.

Given the context of the Log4Shell vulnerability, make sure you take a look at our blog post on this topic.

Upgrade Instructions

Switch your build to use Gradle 6.9.2 by updating your wrapper:

./gradlew wrapper --gradle-version=6.9.2

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.9.2.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.9.1: 6.9.1

Compare Source

This is a patch release for Gradle 6.9, containing backported bugfixes in Gradle 7.2 to Gradle 6.x.

It fixes the following issues:

  • #​18089 Deprecate jcenter() repository
  • #​17950 Renaming and recreating the project directory causes Gradle to lose track of changes on Windows
  • #​17949 Gradle's up-to-date checks do not work on Windows FAT drives

We recommend users upgrade to 6.9.1 instead of 6.9.

Upgrade Instructions

Switch your build to use Gradle 6.9.1 by updating your wrapper:

./gradlew wrapper --gradle-version=6.9.1

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.9.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.9: 6.9

Compare Source

This is a backport release, Gradle 6.9.

This release features bugfixes and other changes that were backported from Gradle 7.0 to Gradle 6.x.

We would like to thank the following community contributors to this release of Gradle:
Ståle Undheim

Upgrade instructions

Switch your build to use Gradle 6.9 by updating your wrapper:

./gradlew wrapper --gradle-version=6.9

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.9.

For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.

Backports

Limited support for Java 16

This release does not support running Gradle with JDK 16, but you can use Java toolchains to request Java 16 and compile your project.

Using dynamic versions in the plugins block

Until now, the plugins { } block only supported fixed versions for community plugins. All version string notations Gradle supports are now accepted, including + or latest.release.

We recommend using the plugins {} block for applying plugins using Gradle 7. The old apply plugin: mechanism will be deprecated in the future.

Note that dynamic versions will introduce non-deterministic behavior to your build process and should be used judiciously. You can use dependency locking to save the set of dependencies resolved when using dynamic versions.

Native support for Apple Silicon

Previous Gradle versions were able to run on new Macs with Apple Silicon processors with some disadvantages:

  • With a native ARM JDK, Gradle features like the rich console and file system watching would be disabled.
  • With an Intel JDK, Gradle would run at about half speed through the Rosetta2 compatibility layer.

With this release, every feature is now supported using a native ARM JDK.
If you're using a new Mac with Apple Silicon, you should use Gradle with a native ARM JDK for optimal performance.

Other backports

Please refer to the list of fixed issues for all issues backported from Gradle 7.0.

v6.8.3: 6.8.3

Compare Source

This is a patch release for Gradle 6.8.

This fixes a critical bug present in Gradle 6.8, 6.8.1 and 6.8.2.

All issues fixed in this patch release

Please don’t use the original 6.8 release or previous patch releases, and instead upgrade to 6.8.3.

Upgrade Instructions

Switch your build to use Gradle 6.8.3 by updating your wrapper:

./gradlew wrapper --gradle-version=6.8.3 --gradle-distribution-sha256-sum 7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.8.3.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.8.2: 6.8.2

Compare Source

This is a patch release for Gradle 6.8.

This fixes several bugs in Gradle 6.8.1.

All issues fixed in this patch release

Please don’t use the original 6.8 release or the 6.8.1, and instead upgrade to 6.8.2.

Upgrade Instructions

Switch your build to use Gradle 6.8.2 by updating your wrapper:

./gradlew wrapper --gradle-version=6.8.2

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.8.2.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.8.1: 6.8.1

Compare Source

This is a patch release for Gradle 6.8.

This fixes several critical bugs in Gradle 6.8.

All issues fixed in this patch release

We recommend that you use Gradle 6.8.1 over the initial release of Gradle 6.8.

Upgrade Instructions

Switch your build to use Gradle 6.8.1 by updating your wrapper:

./gradlew wrapper --gradle-version=6.8.1

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.8.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.8: 6.8

Compare Source

The Gradle team is excited to announce Gradle 6.8.

We would like to thank the following community contributors for their contributions to this release of Gradle:

Marcono1234,
Björn Sundahl,
Roberto Perez Alcolea,
Danny Thomas,
Jeff,
Mattia Tommasone,
jdai8,
David Burström,
Björn Kautler,
Stefan Oehme,
Thad House,
knittl,
hywelbennett,
and Gregorios Leach.

Upgrade Instructions

Switch your build to use Gradle 6.8 by updating your wrapper:

./gradlew wrapper --gradle-version=6.8

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.8.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.7.1: 6.7.1

Compare Source

This is a patch release for Gradle 6.7.

This fixes several critical bugs in Gradle 6.7.

All issues fixed in this patch release

We recommend that you use Gradle 6.7.1 over the initial release of Gradle 6.7.

Upgrade Instructions

Switch your build to use Gradle 6.7.1 by updating your wrapper:

./gradlew wrapper --gradle-version=6.7.1

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.7.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.7: 6.7

Compare Source

The Gradle team is excited to announce Gradle 6.7.

Read the Release Notes

We would like to thank the following community contributors to this release of Gradle:

Roberto Perez Alcolea,
SheliakLyr,
Christian Edward Gruber,
René Gröschke,
Louis CAD,
Campbell Jones,
Leonardo Bezerra Silva Júnior,
Christoph Dreis,
Matthias Robbers,
Vladimir Sitnikov,
Stefan Oehme,
Thad House,
Michał Mlak
and Jochen Schalanda.

Upgrade instructions

Switch your build to use Gradle 6.7 by updating your wrapper:

./gradlew wrapper --gradle-version=6.7

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.

Reporting problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.6.1: 6.6.1

Compare Source

This is a patch release for Gradle 6.6.

This fixes several critical bugs in Gradle 6.6.

All issues fixed in this patch release

We recommend that you use Gradle 6.6.1 over the initial release of Gradle 6.6.

Upgrade Instructions

Switch your build to use Gradle 6.6.1 by updating your wrapper:

./gradlew wrapper --gradle-version=6.6.1

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.6.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.6: 6.6

Compare Source

The Gradle team is excited to announce Gradle 6.6.

Read the Release Notes

We would like to thank the following community contributors to this release of Gradle:

SheliakLyr,
Danny Thomas,
Daiki Hirabayashi,
Sebastian Schuberth,
Frieder Bluemle,
Brick Tamland,
Stefan Oehme,
Yurii Serhiichuk,
JunHyung Lim,
Igor Dvorzhak,
and Leonid Gaiazov.

Upgrade instructions

Switch your build to use Gradle 6.6 by updating your wrapper:

./gradlew wrapper --gradle-version=6.6

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.

Reporting problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.5.1: 6.5.1

Compare Source

This is a patch release for Gradle 6.5.

This fixes several critical bugs in Gradle 6.5:

  • Regression: Gradle 6.5 cached builds cause IllegalStateException #​13367
  • Regression: Compile classpath configuration is not deterministic #​13555
  • Regression: Class cast exception when GStrings are used with System.getProperty #​13569
  • And a number of dependency graph resolution errors (#​13251, #​13316, #​13329, #​13551)

All issues fixed in this patch release

We recommend that you use Gradle 6.5.1 over the initial release of Gradle 6.5.

Upgrade Instructions

Switch your build to use Gradle 6.5.1 by updating your wrapper:

./gradlew wrapper --gradle-version=6.5.1

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 6.5.1.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

v6.5: 6.5

Compare Source

The Gradle team is excited to announce Gradle 6.5.

Read the full release notes

We would like to thank the following community contributors to this release of Gradle:

SheliakLyr,
Daniil Popov,
Scott Robinson,
Cristian Garcia,
fransflippo,
Victor Turansky,
Gregor Dschung,
Roberto Perez Alcolea,
kerr,
Chris Doré,
and Erhard Pointl.

Upgrade Instructions

Switch your build to use Gradle 6.5 by updating your wrapper:

./gradlew wrapper --gradle-version=6.5

See the Gradle 6.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.

Reporting Problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the forum.

pinterest/ktlint (com.pinterest:ktlint)

v0.50.0

Compare Source

Deprecation of ktlint-enable and ktlint-disable directives

The ktlint-disable and ktlint-enable directives are no longer supported. Ktlint rules can now only be suppressed using the @Suppress or @SuppressWarnings annotations. A new rule, internal:ktlint-suppression, is provided to replace the directives with annotations.

API consumers do not need to provide this rule, but it does no harm when done.

The internal:ktlint-suppression rule can not be disabled via the .editorconfig nor via @Suppress or @SuppressWarnings annotations.

Custom Rule Providers need to prepare for Kotlin 1.9

In Kotlin 1.9 the extension points of the embedded kotlin compiler will change. Ktlint only uses the org.jetbrains.kotlin.com.intellij.treeCopyHandler extension point. This extension is not yet supported in 1.9, neither is it documented (#KT-58704). Without this extension point it might happen that your custom rules will throw exceptions during runtime. See #​1981.

In Ktlint, 7 out of 77 rules needed small and sometimes bigger changes to become independent of the extension point org.jetbrains.kotlin.com.intellij.treeCopyHandler. The impact on your custom rules may vary dependent on the way the autocorrect has been implemented. When manipulating ASTNodes there seems to be no impact. When, manipulating PsiElements, some functions consistently result in a runtime exception.

Based on the refactoring of the rules as provided by ktlint-ruleset-standard in Ktlint 0.49.x the suggested refactoring is as follows:

  • Replace LeafElement.replaceWithText(String) with LeafElement.rawReplaceWithText(String).
  • Replace PsiElement.addAfter(PsiElement, PsiElement) with AstNode.addChild(AstNode, AstNode). Note that this method inserts the new node (first) argument before the second argument node and as of that is not a simple replacement of the PsiElement.addAfter(PsiElement, PsiElement).
  • Replace PsiElement.replace(PsiElement) with a sequence of AstNode.addChild(AstNode, AstNode) and AstNode.removeChild(AstNode).

Be aware that your custom rules might use other functions which also throw exceptions when the extension point org.jetbrains.kotlin.com.intellij.treeCopyHandler is no longer supported.

In order to help you to analyse and fix the problems with your custom rules, ktlint temporarily supports to disable the extension point org.jetbrains.kotlin.com.intellij.treeCopyHandler using a flag. This flag is available in the Ktlint CLI and in the KtlintRuleEngine. By default, the extension point is enabled like it was in previous versions of ktlint.

At least you should analyse the problems by running your test suits by running ktlint and disabling the extension point. Next you can start with fixing and releasing the updated rules. All rules in this version of ktlint have already been refactored and are not dependent on the extension point anymore. In Ktlint CLI the flag is to be activated with parameter --disable-kotlin-extension-point. API Consumers that use the KtlintRuleEngine directly, have to set property enableKotlinCompilerExtensionPoint to false.

At this point in time, it is not yet decided what the next steps will be. Ktlint might drop the support of the extension points entirely. Or, if the extension point org.jetbrains.kotlin.com.intellij.treeCopyHandler is fully supported at the time that ktlint will be based on kotlin 1.9 it might be kept. In either case, the flag will be dropped in a next version of ktlint.

Added
  • Add new experimental rule binary-expression-wrapping. This rule wraps a binary expression in case the max line length is exceeded (#​1940)
  • Add flag to disable extension point org.jetbrains.kotlin.com.intellij.treeCopyHandler to analyse impact on custom rules #​1981
  • Add new experimental rule no-empty-file for all code styles. A kotlin (script) file may not be empty (#​1074)
  • Add new experimental rule statement-wrapping which ensures function, class, or other blocks statement body doesn't start or end at starting or ending braces of the block (#​1938). Note, although this rule is added in this release, it is never executed except in unit tests.
  • Add new experimental rule blank-line-before-declaration. This rule requires a blank line before class, function or property declarations (#​1939)
  • Wrap multiple statements on same line wrapping (#​1078)
  • Add new rule ktlint-suppression to replace the ktlint-disable and ktlint-enable directives with annotations. This rule can not be disabled via the .editorconfig (#​1947)
  • Inform user about using --format option of KtLint CLI when finding a violation that can be autocorrected (#​1071)
Removed
  • Code which was deprecated in 0.49.x is removed. Consult changelog of 0.49.x` released for more information. Summary of removed code:
Fixed
  • Do not flag a (potential) mutable extension property in case the getter is annotated or prefixed with a modifier property-naming (#​2024)
  • Do not merge an annotated expression body with the function signature even if it fits on a single line (#​2043)
  • Ignore property with name serialVersionUID in property-naming (#​2045)
  • Prevent incorrect reporting of violations in case a nullable function type reference exceeds the maximum line length parameter-list-wrapping (#​1324)
  • Prevent false negative on else branch when body contains only chained calls or binary expression (#​2057)
  • Fix indent when property value is wrapped to next line (#​2095)
Changed
  • Fix Java interoperability issues with RuleId and RuleSetId classes. Those classes were defined as value classes in 0.49.0 and 0.49.1. Although the classes were marked with @JvmInline it seems that it is not possible to uses those classes from Java base API Consumers like Spotless. The classes have now been replaced with data classes (#​2041)
  • Update dependency info.picocli:picocli to v4.7.4
  • Update dependency org.junit.jupiter:junit-jupiter to v5.9.3
  • Update Kotlin development version to 1.8.22 and Kotlin version to 1.8.22.
  • Update dependency io.github.detekt.sarif4k:sarif4k to v0.4.0
  • Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.8.20
  • Run format up to 3 times in case formatting introduces changes which also can be autocorrected (#​2084)

v0.49.1

Compare Source

Added
Removed
Fixed
  • Store path of file containing a lint violation relative to the location of the baseline file itself (#​1962)
  • Print absolute path of file in lint violations when flag "--relative" is not specified in Ktlint CLI (#​1963)
  • Handle parameter --code-style=android_studio in Ktlint CLI identical to deprecated parameter --android (#​1982)
  • Prevent nullpointer exception (NPE) if class without body is followed by multiple blank lines until end of file no-consecutive-blank-lines (#​1987)
  • Allow to 'unset' the .editorconfig property ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than when using ktlint_official code style function-signature (#​1977)
  • Prevent nullpointer exception (NPE) if or operator at start of line is followed by dot qualified expression indent (#​1993)
  • Fix indentation of multiline parameter list in function literal indent (#​1976)
  • Restrict indentation of closing quotes to ktlint_official code style to keep formatting of other code styles consistent with 0.48.x and before indent (#​1971)
  • Extract rule no-single-line-block-comment from comment-wrapping rule. The no-single-line-block-comment rule is added as experimental rule to the ktlint_official code style, but it can be enabled explicitly for the other code styles as well. (#​1980)
  • Clean-up unwanted logging dependencies (#​1998)
  • Fix directory traversal for patterns referring to paths outside of current working directory or any of it child directories (#​2002)
  • Prevent multiple expressions on same line separated by semicolon (#​1078)
Changed
  • Moved class Baseline from ktlint-cli to ktlint-cli-reporter-baseline so that Baseline functionality is reusable for API Consumers.

v0.49.0

Compare Source

WARNING: This version of KtLint contains a number of breaking changes in KtLint CLI and KtLint API. If you are using KtLint with custom ruleset jars or custom reporter jars, then those need to be upgraded before you can use them with this version of ktlint. Please contact the maintainers of those jars and ask them to upgrade a.s.a.p.

All rule id's in the output of Ktlint are now prefixed with a rule set. Although KtLint currently supports standard rules to be unqualified, users are encouraged to include the rule set id in all references to rules. This includes following:

  • The --disabled-rules parameter in KtLint CLI.
  • The .editorconfig properties used to enable or disable rule and rule sets. Note that properties disabled_rules and ktlint_disabled_rules have been removed in this release. See disabled rules for more information.
  • The source element in the KtLint CLI baseline.xml file. Regenerating this file, fixes all rule references automatically.
  • The KtLint disable directives ktlint-enable / ktlint-disable and the @Suppress('ktlint:...') annotations.
  • The VisitorModifier.RunAfterRule.
Moving experimental rules to standard rule set

The experimental rule set has been merged with standard rule set. The rules which formerly were part of the experimental rule set are still being treated as before. The rules will only be run in case .editorconfig property ktlint_experimental is enabled or in case the rule is explicitly enabled.

Note that the prefix experimental: has to be removed from all references to this rule. Check references in:

  • The --disabled-rules parameter in KtLint CLI.
  • The .editorconfig properties used to enable or disable rule and rule sets. Note that properties disabled_rules and ktlint_disabled_rules have been removed in this release. See disabled rules for more information.
  • The KtLint disable directives ktlint-enable / ktlint-disable and the @Suppress('ktlint:...') annotations.
  • The VisitorModifier.RunAfterRule.
Promote experimental rules to non-experimental

The rules below have been promoted to non-experimental rules:

Note that this only affects users that have enabled the standard ruleset while having the experimental rules disabled.

API Changes & RuleSet providers & Reporter Providers

This release is intended to be the last release before the 1.0.x release of ktlint. If all goes as planned, the 1.0.x release does not contain any new breaking changes with except of removal of functionality which is deprecated in this release.

This release contains a lot of breaking changes which aims to improve the future maintainability of Ktlint. If you get stuck while migrating, please reach out to us by creating an issue.

Experimental rules

Rules in custom rule sets can now be marked as experimental by implementing the Rule.Experimental interface on the rule. Rules marked with this interface will only be executed by Ktlint if .editorconfig property ktlint_experimental is enabled or if the rule itself has been enabled explicitly.

When using this feature, experimental rules should not be defined in a separate rule set as that would require a distinct rule set id. When moving a rule from an experimental rule set to a non-experimental rule set this would mean that the qualified rule id changes. For users of such rules this means that ktlint directives to suppress the rule and properties in the .editorconfig files have to be changed.

EditorConfig

Field defaultAndroidValue in class EditorConfigProperty has been renamed to androidStudioCodeStyleDefaultValue. New fields ktlintOfficialCodeStyleDefaultValue and intellijIdeaCodeStyleDefaultValue have been added. Read more about this in the section "Ktlint Official code style".

The .editorconfig properties disabled_rules and ktlint_disabled_rules are no longer supported. Specifying those properties in the editorConfigOverride or editorConfigDefaults result in warnings at runtime.

'Ktlint Official` code style and renaming of existing code styles

A new code style ktlint_official is introduced. This code style is work in progress but will become the default code style in the 1.0 release. Please try out the new code style and provide your feedback via the issue tracker.

This ktlint_official code style combines the best elements from the Kotlin Coding conventions and Android's Kotlin styleguide. This code style also provides additional formatting on topics which are not (explicitly) mentioned in those conventions and style guide. But do note that this code style sometimes formats code in a way which is not accepted by the default code formatters in IntelliJ IDEA and Android Studio. The formatters of those editors produce nicely formatted code in the vast majority of cases. But in a number of edge cases, the formatting contains bugs which are waiting to be fixed for several years. The new code style formats code in a way which is compatible with the default formatting of the editors whenever possible. When using this codestyle, it is best to disable (e.g. not use) code formatting in the editor.

The existing code styles have been renamed to make more clear what the basis of the code style is.

The official code style has been renamed to intellij_idea. Code formatted with this code style aims to be compatible with default formatter of IntelliJ IDEA. This code style is based on Kotlin Coding conventions. If .editorconfig property ktlint_code_style has been set to android then do not forget to change the value of that property to intellij_idea. When not set, this is still the default code style of ktlint 0.49. Note that the default code style will be changed to ktlint_official in the 1.0 release.

Code style android has been renamed to android_studio. Code formatted with this code style aims to be compatible with default formatter of Android Studio. This code style is based on Android's Kotlin styleguide. If .editorconfig property ktlint_code_style has been set to android then do not forget to change the value of that property to android_studio.

Package restructuring and class relocation

The internal structure of the Ktlint project has been revised. The Ktlint CLI and KtLint API modules have been decoupled where possible. Modules have been restructured and renamed. See API Overview for more information.

This is the last release that contains module ktlint-core as it had too many responsibilities. All classes in this module are relocated to other modules. Some classes have also been renamed. See tables below for details. Classes that are left behind in the ktlint-core module are deprecated and were kept in this version for backwards compatibility only. The ktlint-core module will be removed in Ktlint 0.50.x.

Classes below have been moved from module ktlint-core to the new module ktlint-rule-engine-core:

Old class/package name in ktlint-core New class/package name in ktlint-rule-engine-core
com.pinterest.ktlint.core.api.editorconfig com.pinterest.ktlint.rule.engine.core.api.editorconfig
com.pinterest.ktlint.core.api.EditorConfigProperties com.pinterest.ktlint.rule.engine.core.api.EditorConfig
com.pinterest.ktlint.core.api.OptInFeatures com.pinterest.ktlint.rule.engine.core.api.OptInFeatures
com.pinterest.ktlint.core.ast.ElementType com.pinterest.ktlint.rule.engine.core.api.ElementType
com.pinterest.ktlint.core.ast.package com.pinterest.ktlint.rule.engine.core.api.ASTNodeExtension
com.pinterest.ktlint.core.IndentConfig com.pinterest.ktlint.rule.engine.core.api.IndentConfig
com.pinterest.ktlint.core.Rule com.pinterest.ktlint.rule.engine.core.api.Rule
com.pinterest.ktlint.core.RuleProvider com.pinterest.ktlint.rule.engine.core.api.RuleProvider

Classes below have been moved from module ktlint-core to the new module ktlint-rule-engine:

Old class/package name in ktlint-core New class/package name in ktlint-rule-engine
com.pinterest.ktlint.core.api.EditorConfigDefaults com.pinterest.ktlint.rule.engine.api.EditorConfigDefaults
com.pinterest.ktlint.core.api.EditorConfigOverride com.pinterest.ktlint.rule.engine.api.EditorConfigOverride
com.pinterest.ktlint.core.api.KtLintParseException com.pinterest.ktlint.rule.engine.api.KtLintParseException
com.pinterest.ktlint.core.api.KtLintRuleException com.pinterest.ktlint.rule.engine.api.KtLintRuleException
com.pinterest.ktlint.core.KtLint com.pinterest.ktlint.rule.engine.api.KtLintRuleEngine
com.pinterest.ktlint.core.LintError com.pinterest.ktlint.rule.engine.api.LintError

Class com.pinterest.ktlint.core.KtLint.Code.CodeFile has been replaced with factory method com.pinterest.ktlint.rule.engine.api.Code.fromFile. Likewise, class com.pinterest.ktlint.core.KtLint.Code.CodeSnippet has been replaced with factory method com.pinterest.ktlint.rule.engine.api.Code.fromSnippet.

Class below has been moved from module ktlint-core to the new module ktlint-cli-ruleset-core:

Old class/package name in ktlint-core New class/package name in ktlint-cli-ruleset-core
com.pinterest.ktlint.core.RuleSetProviderV2 com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3

Class below has been moved from module ktlint-core to the new module ktlint-cli-reporter-core:

Old class/package name in ktlint-core New class/package name in ktlint-cli-reporter-core
com.pinterest.ktlint.core.KtlintVersion com.pinterest.ktlint.cli.reporter.core.api.KtlintVersion

Class below has been moved from module ktlint-core to the new module ktlint-logger:

Old class/package name in ktlint-core New class/package name in ktlint-logger
com.pinterest.ktlint.core.KtLintKLoggerInitializer.kt com.pinterest.ktlint.logger.api.KtLintKLoggerInitializer.kt

Class below has been relocated from module ktlint-core to module ktlint-cli:

Old class/package name in ktlint-core New class/package name in ktlint-cli
com.pinterest.ktlint.core.api.Baseline com.pinterest.ktlint.cli.api.Baseline

Module ktlint-reporter-baseline has been renamed to ktlint-cli-reporter-baseline. Class below has been relocated:

Old class/package name in ktlint-reporter-baseline New class/package name in ktlint-cli-reporter-baseline
com.pinterest.ktlint.reporter.baseline com.pinterest.ktlint.cli.reporter.baseline

Module ktlint-reporter-checkstyle has been renamed to ktlint-cli-reporter-checkstyle. Class below has been relocated:

Old class/package name in ktlint-reporter-checkstyle New class/package name in ktlint-cli-reporter-checkstyle
com.pinterest.ktlint.reporter.checkstyle com.pinterest.ktlint.cli.reporter.checkstyle

Module ktlint-reporter-format has been renamed to ktlint-cli-reporter-format. Class below has been relocated:

Old class/package name in ktlint-reporter-format New class/package name in ktlint-cli-reporter-format
com.pinterest.ktlint.reporter.format com.pinterest.ktlint.cli.reporter.format

Module ktlint-reporter-html has been renamed to ktlint-cli-reporter-html. Class below has been relocated:

Old class/package name in ktlint-reporter-html New class/package name in ktlint-cli-reporter-html
com.pinterest.ktlint.reporter.html com.pinterest.ktlint.cli.reporter.html

Module ktlint-reporter-json has been renamed to ktlint-cli-reporter-json. Class below has been relocated:

Old class/package name in ktlint-reporter-json New class/package name in ktlint-cli-reporter-json
com.pinterest.ktlint.reporter.json com.pinterest.ktlint.cli.reporter.json

Module ktlint-reporter-plain has been renamed to ktlint-cli-reporter-plain. Class below has been relocated:

Old class/package name in ktlint-reporter-plain New class/package name in ktlint-cli-reporter-plain
com.pinterest.ktlint.reporter.plain com.pinterest.ktlint.cli.reporter.plain

Module ktlint-reporter-plain-summary has been renamed to ktlint-cli-reporter-plain-summary. Class below has been relocated:

Old class/package name in ktlint-reporter-plain-summary New class/package name in ktlint-cli-reporter-plain-summary
com.pinterest.ktlint.reporter.plain com.pinterest.ktlint.cli.reporter.plainsummary

Module ktlint-reporter-sarif has been renamed to ktlint-cli-reporter-sarif. Class below has been relocated:

Old class/package name in ktlint-reporter-sarif New class/package name in ktlint-cli-reporter-sarif
com.pinterest.ktlint.reporter.sarif com.pinterest.ktlint.cli.reporter.sarif
Custom Ruleset Provider RuleSetProviderV2

Custom rule sets build for older versions of KtLint are no longer supported by this version of KtLint. The com.pinterest.ktlint.core.RuleSetProviderV2 interface has been replaced with RuleSetProviderV3. The accompanying interfaces com.pinterest.ktlint.core.RuleProvider and com.pinterest.ktlint.core.Rule have been replaced with com.pinterest.ktlint.ruleset.core.api.RuleProvider and com.pinterest.ktlint.ruleset.core.api.Rule respectively.

Contrary to RuleSetProviderV2, the RuleSetProviderV3 no longer contains information about the rule set. About information now has to be specified in the new Rule class. This allows custom rule set providers to combine rules originating from different rule sets into a new rule set without losing information about its origin. The type of the id of the rule set is changed from String to RuleSetId.

Note that due to renaming and relocation of the RuleSetProviderV3 interface the name of the service provider in the custom reporter needs to be changed from resources/META-INF/services/com.pinterest.ktlint.core.RuleSetProviderV2 to resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3.

The rule id's in com.pinterest.ktlint.ruleset.core.api.Rule have been changed from type String to RuleId. A RuleId has a value that must adhere the convention "rule-set-id:rule-id". The rule set id standard is reserved for rules which are maintained by the KtLint project. Rules created by custom rule set providers and API Consumers should use a prefix other than standard to mark the origin of rules which are not maintained by the KtLint project.

When wrapping a rule from the ktlint project and modifying its behavior, please change the ruleId and about fields in the wrapped rule, so that it is clear to users whenever they use the original rule provided by KtLint versus a modified version which is not maintained by the KtLint project.

The typealias com.pinterest.ktlint.core.api.EditorConfigProperties has been replaced with com.pinterest.ktlint.rule.engine.core.api.EditorConfig


Configuration

📅 Schedule: Branch creation - "before 8am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from cbe7d78 to d0946e6 Compare June 12, 2020 03:35
@renovate renovate bot force-pushed the renovate/all-dependencies branch from d0946e6 to 448034f Compare June 16, 2020 18:01
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 448034f to cd797a7 Compare June 30, 2020 07:14
@renovate renovate bot force-pushed the renovate/all-dependencies branch from cd797a7 to 2f0286b Compare August 25, 2020 15:07
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 2f0286b to d8bc38e Compare October 26, 2020 11:04
@renovate renovate bot force-pushed the renovate/all-dependencies branch from d8bc38e to 65e2cdb Compare November 28, 2020 18:04
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 65e2cdb to fde6e9b Compare December 11, 2020 16:04
@renovate renovate bot force-pushed the renovate/all-dependencies branch from fde6e9b to 1fc45bc Compare January 9, 2021 16:03
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 1fc45bc to 49637e8 Compare January 24, 2021 16:00
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 49637e8 to c5a0c4f Compare February 9, 2021 16:05
@renovate renovate bot force-pushed the renovate/all-dependencies branch from c5a0c4f to 3d3e761 Compare April 26, 2021 14:34
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 3d3e761 to 1f4702a Compare May 9, 2021 23:06
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 1f4702a to 99c10b3 Compare October 18, 2021 16:54
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 99c10b3 to 2e5a52a Compare March 7, 2022 11:11
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 2e5a52a to 713ab55 Compare March 26, 2022 12:28
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 713ab55 to f795993 Compare April 24, 2022 22:38
@renovate renovate bot force-pushed the renovate/all-dependencies branch from f795993 to c6b8f80 Compare May 16, 2022 03:00
@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from 7909fc9 to a6d6702 Compare June 23, 2022 18:36
@renovate renovate bot force-pushed the renovate/all-dependencies branch from a6d6702 to cdbf800 Compare September 25, 2022 16:28
@renovate renovate bot force-pushed the renovate/all-dependencies branch from cdbf800 to bb6b11d Compare November 20, 2022 13:45
@renovate renovate bot force-pushed the renovate/all-dependencies branch from bb6b11d to 8bf3d47 Compare March 16, 2023 06:33
@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from 1d9680d to a415f24 Compare March 30, 2023 11:27
@renovate renovate bot force-pushed the renovate/all-dependencies branch from a415f24 to 0afab93 Compare May 28, 2023 12:18
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 0afab93 to c8ff6d3 Compare June 8, 2023 00:08
@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from e5bcea4 to 364a4fe Compare July 6, 2023 10:08
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 364a4fe to 5f06d5d Compare July 12, 2023 22:02
@renovate renovate bot force-pushed the renovate/all-dependencies branch 18 times, most recently from bdf0fb2 to af1dac0 Compare February 4, 2024 10:40
@renovate renovate bot force-pushed the renovate/all-dependencies branch from af1dac0 to c4fd574 Compare March 7, 2024 09:15
@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from 80a4ed2 to e1b0d7b Compare May 7, 2024 11:58
@renovate renovate bot force-pushed the renovate/all-dependencies branch 2 times, most recently from 4772929 to 70ab595 Compare July 10, 2024 08:02
@renovate renovate bot force-pushed the renovate/all-dependencies branch from 70ab595 to 51e122f Compare July 19, 2024 13:11
@renovate renovate bot force-pushed the renovate/all-dependencies branch 4 times, most recently from 30cc804 to aa6f2f2 Compare December 2, 2024 12:39
@renovate renovate bot force-pushed the renovate/all-dependencies branch from aa6f2f2 to 1251402 Compare December 17, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants