1+ import scala .language .implicitConversions
2+
13Global / onChangedBuildSource := ReloadOnSourceChanges
24
35// For performance testing, ensure each test run one-by-one
46Global / concurrentRestrictions := Seq (Tags .limit(Tags .Test , 1 ))
57
6- val AIRFRAME_VERSION = " 2025.1.27 "
8+ val AIRFRAME_VERSION = " 2026.2.2 "
79
810// Use dynamic snapshot version strings for non tagged versions
911ThisBuild / dynverSonatypeSnapshots := true
@@ -67,8 +69,25 @@ val buildSettings = Seq[Setting[?]](
6769 crossPaths := false ,
6870 publishMavenStyle := true ,
6971 // JVM options for building
70- scalacOptions ++= Seq (" -encoding" , " UTF-8" , " -deprecation" , " -unchecked" , " -feature" ),
72+ // -release 8 pins scalac's resolution of JDK API calls to the JDK8 surface (e.g.
73+ // test code calling ByteBuffer.flip() resolves to the inherited Buffer.flip():Buffer
74+ // rather than JDK9's covariant ByteBuffer.flip():ByteBuffer override, which doesn't
75+ // exist on a real JDK8 at runtime -> NoSuchMethodError). Unlike javac's --release,
76+ // this doesn't need an ignore-symbol-file escape hatch since test code never touches
77+ // JDK-internal APIs the way the main sources' Unsafe usage does.
78+ scalacOptions ++=
79+ Seq (" -encoding" , " UTF-8" , " -deprecation" , " -unchecked" , " -feature" , " -release" , " 8" ),
7180 Test / javaOptions ++= Seq (" -ea" ),
81+ // sbt 2 itself requires JDK 17+ to run, but each CI lane still needs to compile and
82+ // test against its own target JDK (e.g. 8) to faithfully reproduce runtime behavior:
83+ // javac resolves API calls against whichever JDK actually runs it (-source/-target
84+ // only constrain language level and bytecode version, not API resolution), so e.g.
85+ // compiling on JDK9+ can bind to covariant overloads like ByteBuffer.flip():
86+ // ByteBuffer that don't exist on a real JDK8 at runtime. When TEST_JAVA_HOME is set,
87+ // fork both compilation and test execution onto that JDK; otherwise use the JDK
88+ // running sbt, as before.
89+ javaHome := sys.env.get(" TEST_JAVA_HOME" ).map(file),
90+ Test / fork := true ,
7291 javacOptions ++= Seq (" -source" , " 1.8" , " -target" , " 1.8" ),
7392 Compile / compile / javacOptions ++=
7493 Seq (" -encoding" , " UTF-8" , " -Xlint:unchecked" , " -Xlint:deprecation" ),
@@ -92,8 +111,8 @@ val buildSettings = Seq[Setting[?]](
92111 // Style check config: (sbt-jchekcstyle)
93112 jcheckStyleConfig := " facebook" ,
94113 // Run jcheckstyle both for main and test codes
95- Compile / compile := ((Compile / compile) dependsOn (Compile / jcheckStyle)) .value,
96- Test / compile := ((Test / compile) dependsOn (Test / jcheckStyle)) .value
114+ Compile / compile := Def .uncached ((Compile / compile). dependsOn(Compile / jcheckStyle).value) ,
115+ Test / compile := Def .uncached ((Test / compile). dependsOn(Test / jcheckStyle).value)
97116)
98117
99118val junitJupiter = " org.junit.jupiter" % " junit-jupiter" % " 5.14.4" % " test"
@@ -145,7 +164,6 @@ lazy val msgpackCore = Project(id = "msgpack-core", base = file("msgpack-core"))
145164 " --add-opens=java.base/java.nio=ALL-UNNAMED" ,
146165 " --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
147166 ),
148- Test / fork := true ,
149167 libraryDependencies ++=
150168 Seq (
151169 // msgpack-core should have no external dependencies
@@ -173,7 +191,7 @@ lazy val msgpackJackson = Project(id = "msgpack-jackson", base = file("msgpack-j
173191 OsgiKeys .exportPackage := Seq (" org.msgpack.jackson" , " org.msgpack.jackson.dataformat" ),
174192 libraryDependencies ++=
175193 Seq (
176- " com.fasterxml.jackson.core" % " jackson-databind" % " 2.20 .0" ,
194+ " com.fasterxml.jackson.core" % " jackson-databind" % " 2.22 .0" ,
177195 junitJupiter,
178196 junitVintage,
179197 " org.apache.commons" % " commons-math3" % " 3.6.1" % " test"
0 commit comments