Skip to content

Commit cb0fd38

Browse files
committed
adaptions to min-required gjf version
1 parent 94eaa5e commit cb0fd38

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigAvoidanceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ void noConfigOnHelp() throws IOException {
3131
"apply plugin: 'java'",
3232
"spotless {",
3333
" java {",
34-
" googleJavaFormat('1.2')",
34+
" googleJavaFormat()",
3535
" }",
3636
"}",
3737
"",

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigurationCacheTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 DiffPlug
2+
* Copyright 2020-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ public void helpConfigures() throws IOException {
3939
"apply plugin: 'java'",
4040
"spotless {",
4141
" java {",
42-
" googleJavaFormat('1.2')",
42+
" googleJavaFormat()",
4343
" }",
4444
"}");
4545
gradleRunner().withArguments("help").build();
@@ -55,7 +55,7 @@ public void helpConfiguresIfTasksAreCreated() throws IOException {
5555
"apply plugin: 'java'",
5656
"spotless {",
5757
" java {",
58-
" googleJavaFormat('1.2')",
58+
" googleJavaFormat()",
5959
" }",
6060
"}",
6161
"tasks.named('spotlessJavaApply').get()");
@@ -72,7 +72,7 @@ public void jvmLocalCache() throws IOException {
7272
"spotless {",
7373
" java {",
7474
" target file('test.java')",
75-
" googleJavaFormat('1.2')",
75+
" googleJavaFormat()",
7676
" }",
7777
"}");
7878

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/FilePermissionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 DiffPlug
2+
* Copyright 2020-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ void spotlessApplyShouldPreservePermissions() throws IOException {
4040
"spotless {",
4141
" java {",
4242
" target file('test.java')",
43-
" googleJavaFormat('1.2')",
43+
" googleJavaFormat()",
4444
" }",
4545
"}");
4646
setFile("test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/IndependentTaskTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ void independent() throws IOException {
3232
"",
3333
"def underTest = new JavaExtension(spotless)",
3434
"underTest.target file('test.java')",
35-
"underTest.googleJavaFormat('1.2')",
35+
"underTest.googleJavaFormat()",
3636
"",
3737
"def independent = underTest.createIndependentApplyTask('independent')");
3838
setFile("test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/JavaDefaultTargetTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ void integration() throws IOException {
3232
"",
3333
"spotless {",
3434
" java {",
35-
" googleJavaFormat('1.2')",
35+
" googleJavaFormat()",
3636
" }",
3737
"}");
3838
setFile("src/main/java/test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/MultiProjectTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ void createSubproject(String name) throws IOException {
4747
"spotless {",
4848
" java {",
4949
" target file('test.java')",
50-
" googleJavaFormat('1.2')",
50+
" googleJavaFormat('1.16.0')",
5151
" }",
5252
"}");
5353
setFile(name + "/test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");
@@ -71,7 +71,7 @@ public void hasRootSpotless() throws IOException {
7171
"spotless {",
7272
" java {",
7373
" target file('test.java')",
74-
" googleJavaFormat('1.2')",
74+
" googleJavaFormat('1.16.0')",
7575
" }",
7676
"}");
7777
setFile("test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");
@@ -88,7 +88,7 @@ public void predeclaredFails() throws IOException {
8888
"spotless { predeclareDeps() }");
8989
createNSubprojects();
9090
Assertions.assertThat(gradleRunner().withArguments("spotlessApply").buildAndFail().getOutput())
91-
.contains("Add a step with [com.google.googlejavaformat:google-java-format:1.2] into the `spotlessPredeclare` block in the root project.");
91+
.contains("Add a step with [com.google.googlejavaformat:google-java-format:1.16.0] into the `spotlessPredeclare` block in the root project.");
9292
}
9393

9494
@Test
@@ -100,7 +100,7 @@ public void predeclaredSucceeds() throws IOException {
100100
"repositories { mavenCentral() }",
101101
"spotless { predeclareDeps() }",
102102
"spotlessPredeclare {",
103-
" java { googleJavaFormat('1.2') }",
103+
" java { googleJavaFormat('1.16.0') }",
104104
"}");
105105
createNSubprojects();
106106
gradleRunner().withArguments("spotlessApply").build();
@@ -115,7 +115,7 @@ public void predeclaredFromBuildscriptSucceeds() throws IOException {
115115
"repositories { mavenCentral() }",
116116
"spotless { predeclareDepsFromBuildscript() }",
117117
"spotlessPredeclare {",
118-
" java { googleJavaFormat('1.2') }",
118+
" java { googleJavaFormat('1.16.0') }",
119119
"}");
120120
createNSubprojects();
121121
gradleRunner().withArguments("spotlessApply").build();
@@ -129,7 +129,7 @@ public void predeclaredOrdering() throws IOException {
129129
"}",
130130
"repositories { mavenCentral() }",
131131
"spotlessPredeclare {",
132-
" java { googleJavaFormat('1.2') }",
132+
" java { googleJavaFormat('1.16.0') }",
133133
"}",
134134
"spotless { predeclareDepsFromBuildscript() }");
135135
createNSubprojects();
@@ -145,7 +145,7 @@ public void predeclaredUndeclared() throws IOException {
145145
"}",
146146
"repositories { mavenCentral() }",
147147
"spotlessPredeclare {",
148-
" java { googleJavaFormat('1.2') }",
148+
" java { googleJavaFormat('1.16.0') }",
149149
"}");
150150
createNSubprojects();
151151
Assertions.assertThat(gradleRunner().withArguments("spotlessApply").buildAndFail().getOutput())

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/RegisterDependenciesTaskTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,11 +32,11 @@ void duplicateConfigs() throws IOException {
3232
"spotless {",
3333
" java {",
3434
" target 'src/main/java/**/*.java'",
35-
" googleJavaFormat('1.2')",
35+
" googleJavaFormat()",
3636
" }",
3737
" format 'javaDupe', com.diffplug.gradle.spotless.JavaExtension, {",
3838
" target 'src/boop/java/**/*.java'",
39-
" googleJavaFormat('1.2')",
39+
" googleJavaFormat()",
4040
" }",
4141
"}");
4242

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/WithinBlockTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 DiffPlug
2+
* Copyright 2020-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ void genericFormatTest() throws IOException {
3131
"spotless {",
3232
" format 'customJava', JavaExtension, {",
3333
" target '*.java'",
34-
" googleJavaFormat('1.2')",
34+
" googleJavaFormat()",
3535
" }",
3636
"}");
3737
setFile("test.java").toResource("java/googlejavaformat/JavaCodeUnformatted.test");
@@ -53,7 +53,7 @@ void withinBlocksTourDeForce() throws IOException {
5353
" custom 'lowercase', { str -> str.toLowerCase() }",
5454
" }",
5555
" withinBlocks 'java only', '\\n```java\\n', '\\n```\\n', JavaExtension, {",
56-
" googleJavaFormat('1.2')",
56+
" googleJavaFormat()",
5757
" }",
5858
" }",
5959
"}");

0 commit comments

Comments
 (0)