Skip to content

Commit

Permalink
Unify gson versions to 2.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Jul 2, 2024
1 parent cb88914 commit 1e55d6c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `eclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class GsonStep implements Serializable {
private static final String MAVEN_COORDINATES = "com.google.code.gson:gson";
private static final String INCOMPATIBLE_ERROR_MESSAGE = "There was a problem interacting with Gson; maybe you set an incompatible version?";
public static final String NAME = "gson";
public static final String DEFAULT_VERSION = "2.11.0";

private final JarState.Promised jarState;
private final GsonConfig gsonConfig;
Expand Down
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `eclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

public class JsonExtension extends FormatExtension {
private static final int DEFAULT_INDENTATION = 4;
private static final String DEFAULT_GSON_VERSION = "2.10.1";
private static final String DEFAULT_ZJSONPATCH_VERSION = "0.4.14";
static final String NAME = "json";

Expand Down Expand Up @@ -112,7 +111,7 @@ public GsonConfig() {
this.indentSpaces = DEFAULT_INDENTATION;
this.sortByKeys = false;
this.escapeHtml = false;
this.version = DEFAULT_GSON_VERSION;
this.version = GsonStep.DEFAULT_VERSION;
addStep(createStep());
}

Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `eclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 DiffPlug
* Copyright 2023-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,8 +24,6 @@
import com.diffplug.spotless.maven.FormatterStepFactory;

public class Gson implements FormatterStepFactory {
private static final String DEFAULT_GSON_VERSION = "2.10.1";

@Parameter
int indentSpaces = Json.DEFAULT_INDENTATION;

Expand All @@ -36,7 +34,7 @@ public class Gson implements FormatterStepFactory {
boolean escapeHtml = false;

@Parameter
String version = DEFAULT_GSON_VERSION;
String version = GsonStep.DEFAULT_VERSION;

@Override
public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 DiffPlug
* Copyright 2022-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,6 +15,8 @@
*/
package com.diffplug.spotless.json.gson;

import static com.diffplug.spotless.json.gson.GsonStep.DEFAULT_VERSION;

import java.io.File;

import org.assertj.core.api.Assertions;
Expand All @@ -28,8 +30,6 @@

public class GsonStepTest extends JsonFormatterStepCommonTests {

private static final String DEFAULT_VERSION = "2.10.1";

@Test
void handlesComplexNestedObject() {
doWithResource("cucumberJsonSampleGson");
Expand Down

0 comments on commit 1e55d6c

Please sign in to comment.