File tree 8 files changed +11
-10
lines changed
src/main/java/com/diffplug/spotless/json/gson
src/main/java/com/diffplug/gradle/spotless
src/main/java/com/diffplug/spotless/maven/json
testlib/src/test/java/com/diffplug/spotless/json/gson
8 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
18
18
* Bump default ` eclipse ` version to latest ` 4.29 ` -> ` 4.32 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
19
19
* 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 ) )
20
20
* Bump default ` cdt ` version to latest ` 11.3 ` -> ` 11.6 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
21
+ * Bump default ` gson ` version to latest ` 2.10.1 ` -> ` 2.11.0 ` . ([ #2128 ] ( https://github.com/diffplug/spotless/pull/2128 ) )
21
22
### Fixed
22
23
* Fix compatibility issue introduced by ` ktfmt ` ` 0.51 ` . ([ #2172 ] ( https://github.com/diffplug/spotless/issues/2172 ) )
23
24
### Added
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ dependencies {
95
95
// googleJavaFormat
96
96
googleJavaFormatCompileOnly ' com.google.googlejavaformat:google-java-format:1.22.0'
97
97
// gson
98
- gsonCompileOnly ' com.google.code.gson:gson:2.10.1 '
98
+ gsonCompileOnly ' com.google.code.gson:gson:2.11.0 '
99
99
// jackson
100
100
String VER_JACKSON = ' 2.17.1'
101
101
jacksonCompileOnly " com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON "
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public class GsonStep implements Serializable {
30
30
private static final String MAVEN_COORDINATES = "com.google.code.gson:gson" ;
31
31
private static final String INCOMPATIBLE_ERROR_MESSAGE = "There was a problem interacting with Gson; maybe you set an incompatible version?" ;
32
32
public static final String NAME = "gson" ;
33
+ public static final String DEFAULT_VERSION = "2.11.0" ;
33
34
34
35
private final JarState .Promised jarState ;
35
36
private final GsonConfig gsonConfig ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
11
11
* Bump default ` eclipse ` version to latest ` 4.29 ` -> ` 4.32 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
12
12
* 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 ) )
13
13
* Bump default ` cdt ` version to latest ` 11.3 ` -> ` 11.6 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
14
+ * Bump default ` gson ` version to latest ` 2.10.1 ` -> ` 2.11.0 ` . ([ #2128 ] ( https://github.com/diffplug/spotless/pull/2128 ) )
14
15
### Fixed
15
16
* Fix compatibility issue introduced by ` ktfmt ` ` 0.51 ` . ([ #2172 ] ( https://github.com/diffplug/spotless/issues/2172 ) )
16
17
### Added
Original file line number Diff line number Diff line change 31
31
32
32
public class JsonExtension extends FormatExtension {
33
33
private static final int DEFAULT_INDENTATION = 4 ;
34
- private static final String DEFAULT_GSON_VERSION = "2.10.1" ;
35
34
private static final String DEFAULT_ZJSONPATCH_VERSION = "0.4.14" ;
36
35
static final String NAME = "json" ;
37
36
@@ -112,7 +111,7 @@ public GsonConfig() {
112
111
this .indentSpaces = DEFAULT_INDENTATION ;
113
112
this .sortByKeys = false ;
114
113
this .escapeHtml = false ;
115
- this .version = DEFAULT_GSON_VERSION ;
114
+ this .version = GsonStep . DEFAULT_VERSION ;
116
115
addStep (createStep ());
117
116
}
118
117
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
11
11
* Bump default ` eclipse ` version to latest ` 4.29 ` -> ` 4.32 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
12
12
* 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 ) )
13
13
* Bump default ` cdt ` version to latest ` 11.3 ` -> ` 11.6 ` . ([ #2179 ] ( https://github.com/diffplug/spotless/pull/2179 ) )
14
+ * Bump default ` gson ` version to latest ` 2.10.1 ` -> ` 2.11.0 ` . ([ #2128 ] ( https://github.com/diffplug/spotless/pull/2128 ) )
14
15
### Fixed
15
16
* Fix compatibility issue introduced by ` ktfmt ` ` 0.51 ` . ([ #2172 ] ( https://github.com/diffplug/spotless/issues/2172 ) )
16
17
### Added
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2023 DiffPlug
2
+ * Copyright 2023-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
24
24
import com .diffplug .spotless .maven .FormatterStepFactory ;
25
25
26
26
public class Gson implements FormatterStepFactory {
27
- private static final String DEFAULT_GSON_VERSION = "2.10.1" ;
28
-
29
27
@ Parameter
30
28
int indentSpaces = Json .DEFAULT_INDENTATION ;
31
29
@@ -36,7 +34,7 @@ public class Gson implements FormatterStepFactory {
36
34
boolean escapeHtml = false ;
37
35
38
36
@ Parameter
39
- String version = DEFAULT_GSON_VERSION ;
37
+ String version = GsonStep . DEFAULT_VERSION ;
40
38
41
39
@ Override
42
40
public FormatterStep newFormatterStep (FormatterStepConfig stepConfig ) {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2022-2023 DiffPlug
2
+ * Copyright 2022-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
15
15
*/
16
16
package com .diffplug .spotless .json .gson ;
17
17
18
+ import static com .diffplug .spotless .json .gson .GsonStep .DEFAULT_VERSION ;
19
+
18
20
import java .io .File ;
19
21
20
22
import org .assertj .core .api .Assertions ;
28
30
29
31
public class GsonStepTest extends JsonFormatterStepCommonTests {
30
32
31
- private static final String DEFAULT_VERSION = "2.10.1" ;
32
-
33
33
@ Test
34
34
void handlesComplexNestedObject () {
35
35
doWithResource ("cucumberJsonSampleGson" );
You can’t perform that action at this time.
0 commit comments