Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import me.champeau.gradle.japicmp.report.ViolationTransformerConfiguration;
import me.champeau.gradle.japicmp.report.ViolationsGenerator;
import org.gradle.api.GradleException;
import org.gradle.api.tasks.VerificationException;

import javax.inject.Inject;
import java.io.BufferedWriter;
Expand Down Expand Up @@ -373,7 +374,7 @@ private void generateOutput(JarArchiveComparator jarArchiveComparator) {
} catch (URISyntaxException e) {
reportLink = null;
}
StringBuilder message = new StringBuilder("Detected binary changes.\n")
StringBuilder message = new StringBuilder("Verification failed: Detected binary changes.\n")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to add this string? Looks that the verification is already encoded in the exception type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it shouldn't be strictly necessary, but it does make it more explicit.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm a bit worried though, because we can have scripts which search in the logs for that particular line.

Copy link
Contributor Author

@ribafish ribafish Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed and verified it's still classified as a Verification failure 👍

Copy link
Contributor Author

@ribafish ribafish Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @melix, I saw tests are failing on Gradle <7.4 - VerificationException is only available from Gradle 7.4+, so to properly support down to Gradle 6.6 (your current min supported version), I had to change back to GradleException and modify the exception message - that is done in commit 2da8088. I'm very flexible about the wording of the modification, as long as it's something from this list 😄

I did try to search for any other mention of Detected binary changes in the code to fix any tests relying on that message, but I couldn't find anything. Could you point me to those scripts you mentioned so I can verify they still work and fix them if necessary?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are internal tools, not public.

.append(" - current: ")
.append(prettyPrint(current))
.append("\n - baseline: ")
Expand All @@ -382,7 +383,7 @@ private void generateOutput(JarArchiveComparator jarArchiveComparator) {
message.append(".").append(System.lineSeparator()).append(System.lineSeparator());
message.append("See failure report at ").append(reportLink);
}
throw new GradleException(message.toString());
throw new VerificationException(message.toString());
}
}

Expand Down