From 2b0185d2c7bbf77162788a89104886799eac8304 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Fri, 14 Aug 2026 16:26:28 +0200 Subject: [PATCH] build: cross-publish artifacts for Scala 2.13 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. --- build.sbt | 4 ++-- jitpack.yml | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 jitpack.yml diff --git a/build.sbt b/build.sbt index 140b556..9e10ef8 100644 --- a/build.sbt +++ b/build.sbt @@ -7,8 +7,8 @@ ThisBuild / licenses += ("Apache License, Version 2.0", url("http://ww ThisBuild / startYear := Some(2006) ThisBuild / organizationName := "WorldWide Conferencing, LLC" -val scala212Version = "2.12.20" -val scala213Version = "2.13.16" +val scala212Version = "2.12.21" +val scala213Version = "2.13.18" ThisBuild / scalaVersion := scala212Version ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version) diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..af74f4c --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,10 @@ +# JitPack's default sbt build runs `sbt -Dsbt.log.noformat=true clean publishM2`, +# which publishes only the default Scala version. That is why +# com.github.OpenBankProject.lift-persistence:lift-persistence_2.13 resolves to +# 404 for every tag up to v1.0.4, even though crossScalaVersions has always +# listed 2.13. +# +# `+publishM2` cross-publishes every entry in crossScalaVersions, so a single tag +# yields both lift-persistence_2.12 and lift-persistence_2.13. +install: + - sbt -Dsbt.log.noformat=true clean +publishM2