build: cross-publish artifacts for Scala 2.13 - #2
Merged
hongwei1 merged 1 commit intoAug 14, 2026
Conversation
JitPack runs `sbt clean publishM2` for sbt projects, which publishes only the default Scala version. Every tag up to v1.0.4 therefore ships lift-persistence_2.12 while lift-persistence_2.13 returns 404, even though crossScalaVersions has always listed a 2.13 entry. Add a jitpack.yml that overrides the install command with `+publishM2` so one tag publishes both. Also align the cross-build compiler versions with the ones OBP-API uses (2.12.20 -> 2.12.21, 2.13.16 -> 2.13.18) so the artifact and its consumer are built by the same compiler. Both versions compile and pass all 406 tests unchanged.
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.
Why
OBP-API is being migrated to Scala 2.13, and it consumes this repository through JitPack as
com.github.OpenBankProject.lift-persistence:lift-persistence_${scala.version}. That artifact does not exist for 2.13:The cause is visible in the JitPack build log for v1.0.4:
JitPack's default sbt command has no
+, so it publishes only the default Scala version.crossScalaVersionshas always listed a 2.13 entry, but nothing ever published it. Tagging a new release without fixing this would still produce a 2.12-only artifact.What
jitpack.ymloverriding the install command with+publishM2, so a single tag publishes bothlift-persistence_2.12andlift-persistence_2.13.Verification
sbt +clean +compile +teston JDK 25, both versions, no source changes required:Zero
[error]lines in the build log.After this merges and a tag is cut, both artifacts must be verified by fetching the pom and jar directly — JitPack's
maven-metadata.xmllists versions that do not exist and cannot be used as evidence.