build: migrate to sbt 1.x and cross-publish for Scala 2.13 - #2
Merged
hongwei1 merged 1 commit intoAug 14, 2026
Merged
Conversation
The build definition was still sbt 0.13.11 syntax (`run <<= run in Compile in core`), pinned to Scala 2.12.4, with no crossScalaVersions. OBP-API consumes this repository through JitPack and is moving to Scala 2.13, which needs a matching artifact. - project/build.properties: sbt 0.13.11 -> 1.10.11. - build.sbt: drop the 0.13-only `<<=` root-run delegation, replace `scalaVersion in ThisBuild` with the sbt 1.x slash syntax, and cross-build 2.12.21 + 2.13.18 (the versions OBP-API compiles with). - project/plugins.sbt, project/assembly.sbt: remove. scalajs, sonatype, pgp, release and assembly are all sbt 0.13-era plugins that no setting in this build ever referenced, and they block the sbt 1.x upgrade. - jitpack.yml: JitPack's default sbt command is `clean publishM2`, which publishes only the default Scala version. Override it with `+publishM2` so a single tag yields both the _2.12 and the _2.13 artifacts. The macro implementation needed no changes: it is a blackbox def macro, not a macro annotation, so it does not depend on the paradise plugin, and the reflection API it uses is unchanged in 2.13.
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 consumes this repository through JitPack as
com.github.OpenBankProject:scala-macros:v1.0.0-alpha.3and is being migrated to Scala 2.13. That aggregate pom hardcodes 2.12 artifacts:An already-published pom cannot change, so a 2.13 build has to come from a new tag. Two things block that today: the build definition is sbt 0.13 syntax pinned to a single Scala version, and JitPack's default sbt command publishes only the default Scala version.
What
project/build.properties: sbt 0.13.11 -> 1.10.11.build.sbt: drop the 0.13-onlyrun <<= run in Compile in coreroot-run delegation, movescalaVersion in ThisBuildto sbt 1.x slash syntax, and cross-build 2.12.21 + 2.13.18 (the versions OBP-API compiles with).project/plugins.sbt,project/assembly.sbt: removed. scalajs, sonatype, pgp, release and assembly are sbt 0.13-era plugins that no setting in this build references, and they block the sbt 1.x upgrade.jitpack.yml: override JitPack'sclean publishM2with+publishM2so a single tag publishes both the _2.12 and the _2.13 artifacts.No source file changed. The macro is a blackbox def macro rather than a macro annotation, so it does not need the paradise plugin, and the reflection API it uses (
c.internal.enclosingOwner,paramLists,c.freshName, quasiquotes) is unchanged in 2.13.Verification
sbt +clean +compile +publishM2on JDK 25, zero[error]lines, both versions compiled and published:After a tag is cut, the published artifacts must be verified by fetching pom and jar directly rather than trusting JitPack's
maven-metadata.xml, which lists versions that do not exist.