Skip to content

build(errorprone): skip Maven publish on JDK 8 - #142

Open
halibobo1205 wants to merge 1 commit into
developfrom
fix/errorprone-publish-jdk8
Open

build(errorprone): skip Maven publish on JDK 8#142
halibobo1205 wants to merge 1 commit into
developfrom
fix/errorprone-publish-jdk8

Conversation

@halibobo1205

Copy link
Copy Markdown
Owner

What does this PR do?

Disables the errorprone module's Maven publish tasks on JDK 8, so publishToMavenLocal / publish no longer fail on x86_64:

// No jar is produced, so the root maven-publish setup must not try to publish one
tasks.withType(AbstractPublishToMaven).configureEach { enabled = false }

One file, two lines. Closes #.

Why are these changes required?

errorprone is a compile-time-only module whose dependencies (error_prone_check_api / error_prone_core 2.42.0) ship Java 17 bytecode, so it is intentionally skipped on JDK 8 — both JavaCompile and Jar are disabled and no jar is produced.

The root build.gradle still applies maven-publish to every subproject with from components.java (build.gradle:62 and build.gradle:162), so the publish task asks for a jar that is never built:

> Task :errorprone:jar SKIPPED
> Task :errorprone:publishMavenJavaPublicationToMavenLocal FAILED
   > Artifact errorprone-1.0.0.jar wasn't produced by this build.

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 in jitpack.yml, so JitPack cannot build any version since v4.8.2 (v4.8.2, v4.8.2.1, v4.8.3, and develop / master / release_v4.8.2). v4.8.1.x predates the module and is unaffected.

Scope of the failure is limited to publish* tasks: a plain ./gradlew build on 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:

  • Manual Testing

No unit test is added — this is a Gradle build-script change with no Java code involved.

Check Result
publishMavenJavaPublicationToMavenLocal with JDK 8 (x86_64 build config) SKIPPED, BUILD SUCCESSFUL
Same command with this change reverted (negative control) FAILED, Artifact errorprone-1.0.0.jar wasn't produced by this build. — the original error
errorprone task states on JDK 17 compileJava / jar / publishMavenJavaPublicationToMavenLocal all still enabled=true, i.e. no change to the JDK 17 path
Full jitpack.yml install command on JDK 17 BUILD SUCCESSFUL, all modules published
./gradlew lint pass

Follow up

  • The JDK 8 guard is !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.
  • A CI job that runs the install commands from jitpack.yml on JDK 8 / x86_64 would catch this class of regression, since no existing job runs publish*.

Extra details

The module was introduced in tronprotocol#6698, which added the JDK 8 skip for compile and jar but not for publishing.

@codeant-ai

codeant-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 84f0995 Aug 07, 2026 · 09:40 09:40

@codeant-ai

codeant-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant