Repository navigation
DEV-1115 Fix shimmerdriverpc publish; refuse a 'local' publish - #327
Merged
Merged
Conversation
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]>
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.
Fixes found while testing #324. This PR targets
DEV-1115_release_workflow, so merging it folds the fixes into #324.1.
publishfails on shimmerdriverpc (blocks the first real release)./gradlew publishToMavenLocal -PreleaseVersion=0.0.0_teston #324's head fails:The Shadow plugin adds
ShimmerJavaClass.jar, which has an empty classifier, tocomponents.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 skipspublish, 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
localWithout
-PreleaseVersionthe version islocal. A hand-rungradlew publish(the old process, still on Confluence) would pushlocalto GitHub Packages, which can never overwrite that version. Publishing to a remote repository now fails in that case.publishToMavenLocalis 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_testnow succeeds:0.0.0_test.shimmerdriverpcis the 140 KB thin jar.-PreleaseVersion, and succeeds with it.Also checked on #324 as it stands:
ShimmerJavaClass.jar: all 39,510 classes are class version 52 or older.ShimmerJavaClassinstantiates.GrpcBLERadioByteToolsno longer referencesonExit. The jar currently in Shimmer-MATLAB-ID still does.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