Skip to content

Commit 57bb381

Browse files
committed
Merge branch 'rm-path-error-message' into fix/ktfmt-0.57+
2 parents 04ccdbf + 7b89f83 commit 57bb381

File tree

9 files changed

+16
-22
lines changed

9 files changed

+16
-22
lines changed

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ VER_SLF4J=[1.6,2.0[
3131
VER_DURIAN=1.2.0
3232
VER_JGIT=7.3.0.202506031305-r
3333
VER_JUNIT=5.13.4
34-
VER_ASSERTJ=3.27.4
35-
VER_MOCKITO=5.19.0
36-
VER_SELFIE=2.5.3
34+
VER_ASSERTJ=3.27.6
35+
VER_MOCKITO=5.20.0
36+
VER_SELFIE=2.5.4

gradle/special-tests.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ def special = [
1414
boolean isCiServer = System.getenv().containsKey("CI")
1515
tasks.withType(Test).configureEach {
1616
if (isCiServer) {
17-
retry {
18-
maxRetries = 2
19-
maxFailures = 10
17+
develocity {
18+
testRetry {
19+
maxRetries = 2
20+
maxFailures = 10
21+
}
2022
}
2123
}
2224
// selfie https://selfie.dev/jvm/get-started#gradle

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH="\\\"\\\""
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
172171
# For Cygwin or MSYS, switch paths to Windows format before running java
173172
if "$cygwin" || "$msys" ; then
174173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176174

177175
JAVACMD=$( cygpath --unix "$JAVACMD" )
178176

@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
212210

213211
set -- \
214212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215-
-classpath "$CLASSPATH" \
216213
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217214
"$@"
218215

gradlew.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=
7473

7574

7675
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7877

7978
:end
8079
@rem End local scope for the variables with windows NT shell

plugin-gradle/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1010
* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345))
1111
* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555))
1212
* Bump default `jackson` version to latest `2.19.2` -> `2.20.0`. ([#2606](https://github.com/diffplug/spotless/pull/2606))
13+
* Running `spotlessCheck` with violations unilaterally produces the error message `Run './gradlew spotlessApply' to fix these violations`. ([#2592](https://github.com/diffplug/spotless/issues/2592))
1314
* **BREAKING** Bump default `ktfmt` version to latest `0.53` -> `0.58` ([#2613](https://github.com/diffplug/spotless/pull/2613))
1415
* use `TrailingCommaManagementStrategy` enum instead of `manageTrailingCommas` boolean configuration option
1516

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessCheck.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,7 @@ void init(SpotlessTaskImpl impl) {
138138
getProjectPath().set(getProject().getPath());
139139
getEncoding().set(impl.getEncoding());
140140
getRunToFixMessage().convention(
141-
"Run '" + calculateGradleCommand() + " " + getTaskPathPrefix() + "spotlessApply' to fix these violations.");
142-
}
143-
144-
private String getTaskPathPrefix() {
145-
String path = getProjectPath().get();
146-
return path.equals(":") ? ":" : path + ":";
141+
"Run '" + calculateGradleCommand() + " spotlessApply' to fix all violations.");
147142
}
148143

149144
private static String calculateGradleCommand() {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2024 DiffPlug
2+
* Copyright 2016-2025 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.
@@ -117,8 +117,8 @@ private void assertCheckFailure(Bundle spotless, String... expectedLines) throws
117117
}
118118

119119
static final String EXPECTED_RUN_SPOTLESS_APPLY_SUGGESTION = FileSignature.machineIsWin()
120-
? "Run 'gradlew.bat :spotlessApply' to fix these violations."
121-
: "Run './gradlew :spotlessApply' to fix these violations.";
120+
? "Run 'gradlew.bat spotlessApply' to fix all violations."
121+
: "Run './gradlew spotlessApply' to fix all violations.";
122122

123123
@Test
124124
void lineEndingProblem() throws Exception {

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
// https://github.com/gradle-nexus/publish-plugin/releases
1313
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' apply false
1414
// https://github.com/spotbugs/spotbugs-gradle-plugin/releases
15-
id 'com.github.spotbugs' version '6.2.3' apply false
15+
id 'com.github.spotbugs' version '6.4.2' apply false
1616
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
1717
id 'com.diffplug.spotless-changelog' version '3.1.2' apply false
1818
// https://github.com/radarsh/gradle-test-logger-plugin/blob/develop/CHANGELOG.md

0 commit comments

Comments
 (0)