@@ -1437,6 +1437,9 @@ object Build {
1437
1437
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
1438
1438
" -sourcepath" , (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File .pathSeparator),
1439
1439
),
1440
+ // Make sure that the produced artifacts have the minimum JVM version in the bytecode
1441
+ Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1442
+ Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1440
1443
// Only publish compilation artifacts, no test artifacts
1441
1444
Compile / publishArtifact := true ,
1442
1445
Test / publishArtifact := false ,
@@ -1467,6 +1470,9 @@ object Build {
1467
1470
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
1468
1471
" -sourcepath" , (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File .pathSeparator),
1469
1472
),
1473
+ // Make sure that the produced artifacts have the minimum JVM version in the bytecode
1474
+ Compile / javacOptions ++= Seq (" --target" , Versions .minimumJVMVersion),
1475
+ Compile / scalacOptions ++= Seq (" --java-output-version" , Versions .minimumJVMVersion),
1470
1476
// Only publish compilation artifacts, no test artifacts
1471
1477
Compile / publishArtifact := true ,
1472
1478
Test / publishArtifact := false ,
0 commit comments