Skip to content

fix(llama-android): declare publish → sign task dependency (Gradle implicit-dependency validation)#313

Merged
bernardladenthin merged 2 commits into
mainfrom
claude/llama-android-sign-publish-fix
Jul 10, 2026
Merged

fix(llama-android): declare publish → sign task dependency (Gradle implicit-dependency validation)#313
bernardladenthin merged 2 commits into
mainfrom
claude/llama-android-sign-publish-fix

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Fixes the signed snapshot-publish failure in the llama-android AAR build: Gradle 8's task-output validation rejected
    :publishLlamaAndroidOpenclPublicationToCentralSnapshotsRepository for using the *.asc output of :signLlamaAndroidPublication
    "without declaring an explicit or implicit dependency".
  • Root cause: the two AAR publications (llamaAndroid CPU / llamaAndroidOpencl) attach the same sourcesJar + javadocJar
    instances. sign(publishing.publications) therefore signs those shared jars once, and the other publication's publish task reads
    the resulting .asc signatures without an inferred task dependency — which Gradle flags.
  • Fix (canonical maven-publish + signing multi-publication pattern): make every AbstractPublishToMaven task depend on every
    Sign task, so the ordering is explicit:
    tasks.withType<AbstractPublishToMaven>().configureEach { dependsOn(tasks.withType<Sign>()) }
    It is a no-op when signing is off (fork/PR runs without MAVEN_GPG_PRIVATE_KEY have no Sign tasks), so it only affects the
    signed publish paths.

Scope note: this is in the llama-android AAR publish path (the signed Central-Snapshots deploy), not in the android-llmservice
example app. It surfaces only where signing actually runs (the GPG key is present) — which is why it appears on the main snapshot
publish but not on PR/fork CI.

Test plan

  • CI green on this branch — to be confirmed by this PR run; the real proof is the signed snapshot-publish path, which needs the
    MAVEN_GPG_PRIVATE_KEY secret and thus runs on the main push / publish jobs.
  • Change is inert without signing — tasks.withType<Sign>() is empty when no key is configured, so PR/fork CI is unaffected.
  • Docs — n/a (build-script task-ordering fix).

Related issues / PRs

Surfaced on the main snapshot-publish after the recent GPG signing-preflight work (#306#309) wired signing through the Gradle path
for llama-android.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m


Generated by Claude Code

…alidation)

The signed snapshot publish failed: Gradle 8's task-output validation rejected
':publishLlamaAndroidOpenclPublicationToCentralSnapshotsRepository' using the *.asc
output of ':signLlamaAndroidPublication' without a declared dependency. Both publications
(llamaAndroid / llamaAndroidOpencl) attach the SAME sourcesJar/javadocJar, so signing
produces shared signature files that the *other* publication's publish task consumes.

Fix (canonical maven-publish + signing multi-publication pattern): make every
AbstractPublishToMaven task depend on every Sign task, so the ordering is explicit.
No-op when signing is off (fork/PR runs without MAVEN_GPG_PRIVATE_KEY have no Sign tasks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
The b9941...b9947 range is 12 files (~100 KiB), dominated by Qualcomm
Hexagon DSP + other ggml backend kernel code (upstream-compiled TUs, not
in this project's classifier matrix). The only CPU-side patch-target file
touched is common/arg.cpp, whose sole change is a .set_examples() metadata
edit adding LLAMA_EXAMPLE_CLI to -of/--output-file — a different region
than patch 0001's parse-function block. All eight patches apply unchanged;
no project source changes required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin bernardladenthin merged commit a46a3da into main Jul 10, 2026
13 of 74 checks passed
@bernardladenthin bernardladenthin deleted the claude/llama-android-sign-publish-fix branch July 10, 2026 06:03
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.

2 participants