Skip to content

Commit

Permalink
Bump default ktfmt 0.43 -> 0.44 (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored May 23, 2023
2 parents 152c937 + a9fde3e commit 357274a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Fixed a regression which changed the import sorting order in `googleJavaFormat` introduced in `2.38.0`. ([#1680](https://github.com/diffplug/spotless/pull/1680))
### Changes
* Bump default `googleJavaFormat` version to latest `1.16.0` -> `1.17.0`. ([#1710](https://github.com/diffplug/spotless/pull/1710))
* Bump default `ktfmt` version to latest `0.43` -> `0.44`.([#1691](https://github.com/diffplug/spotless/pull/1691))
* Bump default `ktlint` version to latest `0.48.2` -> `0.49.1`.([#1696](https://github.com/diffplug/spotless/issues/1696))
* Dropped support for `ktlint 0.46.x` following our policy of supporting two breaking changes at a time.
* Bump default `sortpom` version to latest `3.0.0` -> `3.2.1`. ([#1675](https://github.com/diffplug/spotless/pull/1675))
Expand Down
2 changes: 1 addition & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dependencies {
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
// ktfmt
ktfmtCompileOnly "com.facebook:ktfmt:0.43"
ktfmtCompileOnly "com.facebook:ktfmt:0.44"
ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") {
version {
strictly '1.7' // for JDK 8 compatibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class KtfmtStep {
// prevent direct instantiation
private KtfmtStep() {}

private static final String DEFAULT_VERSION = "0.43";
private static final String DEFAULT_VERSION = "0.44";
static final String NAME = "ktfmt";
static final String PACKAGE = "com.facebook";
static final String MAVEN_COORDINATE = PACKAGE + ":ktfmt:";
Expand Down
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Fixed a regression which changed the import sorting order in `googleJavaFormat` introduced in `6.18.0`. ([#1680](https://github.com/diffplug/spotless/pull/1680))
### Changes
* Bump default `googleJavaFormat` version to latest `1.16.0` -> `1.17.0`. ([#1710](https://github.com/diffplug/spotless/pull/1710))
* Bump default `ktfmt` version to latest `0.43` -> `0.44`.([#1691](https://github.com/diffplug/spotless/pull/1691))
* Bump default `ktlint` version to latest `0.48.2` -> `0.49.1`.([#1696](https://github.com/diffplug/spotless/issues/1696))
* Dropped support for `ktlint 0.46.x` following our policy of supporting two breaking changes at a time.
* Bump default `sortpom` version to latest `3.0.0` -> `3.2.1`. ([#1675](https://github.com/diffplug/spotless/pull/1675))
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Fixed a regression which changed the import sorting order in `googleJavaFormat` introduced in `2.36.0`. ([#1680](https://github.com/diffplug/spotless/pull/1680))
### Changes
* Bump default `googleJavaFormat` version to latest `1.16.0` -> `1.17.0`. ([#1710](https://github.com/diffplug/spotless/pull/1710))
* Bump default `ktfmt` version to latest `0.43` -> `0.44`.([#1691](https://github.com/diffplug/spotless/pull/1691))
* Bump default `ktlint` version to latest `0.48.2` -> `0.49.1`.([#1696](https://github.com/diffplug/spotless/issues/1696))
* Dropped support for `ktlint 0.46.x` following our policy of supporting two breaking changes at a time.
* Bump default `sortpom` version to latest `3.0.0` -> `3.2.1`. ([#1675](https://github.com/diffplug/spotless/pull/1675))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
*/
package com.diffplug.spotless.kotlin;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.*;

@Disabled
class KtfmtStepTest extends ResourceHarness {
@Test
void behavior() throws Exception {
Expand All @@ -34,23 +32,17 @@ void dropboxStyle_0_18() throws Exception {
StepHarness.forStep(step).testResource("kotlin/ktfmt/basic.dirty", "kotlin/ktfmt/basic-dropboxstyle.clean");
}

@Test
void dropboxStyle_0_19() throws Exception {
FormatterStep step = KtfmtStep.create("0.19", TestProvisioner.mavenCentral(), KtfmtStep.Style.DROPBOX, null);
StepHarness.forStep(step).testResource("kotlin/ktfmt/basic.dirty", "kotlin/ktfmt/basic-dropboxstyle.clean");
}

@Test
void equality() throws Exception {
new SerializableEqualityTester() {
String version = "0.13";
String version = "0.18";

@Override
protected void setupTest(API api) {
// same version == same
api.areDifferentThan();
// change the version, and it's different
version = "0.12";
version = KtfmtStep.defaultVersion();
api.areDifferentThan();
}

Expand Down

0 comments on commit 357274a

Please sign in to comment.