Skip to content

DEV-1115 Fix shimmerdriverpc publish; refuse a 'local' publish - #327

Merged
JongChern merged 1 commit into
DEV-1115_release_workflowfrom
DEV-1115_release_fixes
Oct 18, 2026
Merged

JongChern merged 1 commit into
DEV-1115_release_workflowfrom
DEV-1115_release_fixes

Conversation

@MAzalya

@MAzalya MAzalya commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Fixes found while testing #324. This PR targets DEV-1115_release_workflow, so merging it folds the fixes into #324.

1. publish fails on shimmerdriverpc (blocks the first real release)

./gradlew publishToMavenLocal -PreleaseVersion=0.0.0_test on #324's head fails:

Execution failed for task ':publishMavenJavaPublicationToMavenLocal'.
> Invalid publication 'mavenJava': multiple artifacts with the identical extension and classifier ('jar', 'null').

The Shadow plugin adds ShimmerJavaClass.jar, which has an empty classifier, to components.java. There it clashes with the plain jar, and Gradle 8.14 rejects the clash. Gradle 8.14 arrived with DEV-1013 in Sep 2026; the last shimmerdriverpc publish (0.11.7_beta) was in Feb 2026, before that. #324's dry run skips publish, so CI never saw this. A real release would have failed here, possibly after publishing the other two artifacts.

Fix: skip the shadow variant in the publication. The thin jar goes out with its dependencies in the POM, as 0.11.7_beta did. The fat jar still goes to MATLAB and the GitHub Release.

2. Refuse to publish version local

Without -PreleaseVersion the version is local. A hand-run gradlew publish (the old process, still on Confluence) would push local to GitHub Packages, which can never overwrite that version. Publishing to a remote repository now fails in that case. publishToMavenLocal is unaffected.

3. Job timeouts

30 minutes on the Gradle jobs and 10 on the others. On ShimmerResearch/ShimmerAndroidAPI#124, a Gradle daemon that ran out of memory held a runner for 6 hours.

Tested locally (JDK 11)

  • publishToMavenLocal -PreleaseVersion=0.0.0_test now succeeds:
    • All three POMs, and their dependencies on each other, read 0.0.0_test.
    • shimmerdriverpc is the 140 KB thin jar.
  • Publishing to a local file repository fails for all three artifacts without -PreleaseVersion, and succeeds with it.

Also checked on #324 as it stands:

  • The dry-run ShimmerJavaClass.jar: all 39,510 classes are class version 52 or older.
  • The jar loads on Java 8u141, and ShimmerJavaClass instantiates.
  • GrpcBLERadioByteTools no longer references onExit. The jar currently in Shimmer-MATLAB-ID still does.
  • The version step, run against the real tags, behaves as described:
    • A blank version gives 0.11.9_beta.
    • 0.11.8_beta (already tagged) is refused on a real run and only warned on a dry run.
    • v0.12.0, and input containing shell metacharacters, are refused.

🤖 Generated with Claude Code

publish failed on shimmerdriverpc with "multiple artifacts with the
identical extension and classifier ('jar', 'null')": the Shadow plugin
adds ShimmerJavaClass.jar (empty classifier) to components.java, and
Gradle 8.14 (DEV-1013) rejects the clash. The PR dry run skips publish,
so the first real release would have failed there after publishing the
other two. Skip the shadow variant, which publishes the plain jar with
its dependencies in the POM, as 0.11.7_beta was.

Without -PreleaseVersion the version is 'local', and a hand-run
`gradlew publish` would push that to GitHub Packages, where it can
never be overwritten. Publishing to a remote repository now refuses
'local'; publishToMavenLocal is unaffected.

Add job timeouts so a hung Gradle daemon cannot hold a runner for the
default 6 hours.

Checked locally (JDK 11): publishToMavenLocal -PreleaseVersion=0.0.0_test
now succeeds, all three POMs and their cross-dependencies read
0.0.0_test, and shimmerdriverpc is the 140 KB thin jar. Publishing to a
file repository without -PreleaseVersion fails for all three.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JongChern
JongChern merged commit d8ed6f7 into DEV-1115_release_workflow Oct 18, 2026
4 checks passed
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