build(errorprone): skip Maven publish on JDK 8 - #142
Open
halibobo1205 wants to merge 1 commit into
Open
Conversation
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Disables the
errorpronemodule's Maven publish tasks on JDK 8, sopublishToMavenLocal/publishno longer fail on x86_64:One file, two lines. Closes #.
Why are these changes required?
errorproneis a compile-time-only module whose dependencies (error_prone_check_api/error_prone_core2.42.0) ship Java 17 bytecode, so it is intentionally skipped on JDK 8 — bothJavaCompileandJarare disabled and no jar is produced.The root
build.gradlestill appliesmaven-publishto every subproject withfrom components.java(build.gradle:62andbuild.gradle:162), so the publish task asks for a jar that is never built:Because the architecture gate pins x86 to JDK 8 (
build.gradle:43), this is not avoidable on that architecture — every x86 publish fails. That breaks the command injitpack.yml, so JitPack cannot build any version since v4.8.2 (v4.8.2,v4.8.2.1,v4.8.3, anddevelop/master/release_v4.8.2).v4.8.1.xpredates the module and is unaffected.Scope of the failure is limited to
publish*tasks: a plain./gradlew buildon x86 is fine, because on JDK 8 no module applies the errorprone plugin and nothing depends on that jar. arm64 / JDK 17 is unaffected — there the jar is produced normally.This PR has been tested by:
No unit test is added — this is a Gradle build-script change with no Java code involved.
publishMavenJavaPublicationToMavenLocalwith JDK 8 (x86_64 build config)SKIPPED,BUILD SUCCESSFULFAILED,Artifact errorprone-1.0.0.jar wasn't produced by this build.— the original errorerrorpronetask states on JDK 17compileJava/jar/publishMavenJavaPublicationToMavenLocalall stillenabled=true, i.e. no change to the JDK 17 pathjitpack.ymlinstall command on JDK 17BUILD SUCCESSFUL, all modules published./gradlew lintFollow up
!JavaVersion.current().isJava11Compatible()and its comment says "JDK 11+", but the real floor is JDK 17 (the ErrorProne artifacts are class-file major 61,Build-Jdk-Spec: 17). This is latent today because the architecture gate accepts only JDK 8 (x86) or JDK 17 (arm64) via an exact-match check, so JDK 11–16 never reach the module. Worth tightening the guard and the comment to 17 together with the JDK 21 work, where that gate may be relaxed.installcommands fromjitpack.ymlon JDK 8 / x86_64 would catch this class of regression, since no existing job runspublish*.Extra details
The module was introduced in tronprotocol#6698, which added the JDK 8 skip for compile and jar but not for publishing.