Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,9 @@ object Build {
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
"-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator),
),
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion),
Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion),
// Only publish compilation artifacts, no test artifacts
Compile / publishArtifact := true,
Test / publishArtifact := false,
Expand Down Expand Up @@ -1467,6 +1470,9 @@ object Build {
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
"-sourcepath", (Compile / sourceDirectories).value.map(_.getCanonicalPath).distinct.mkString(File.pathSeparator),
),
// Make sure that the produced artifacts have the minimum JVM version in the bytecode
Compile / javacOptions ++= Seq("--target", Versions.minimumJVMVersion),
Compile / scalacOptions ++= Seq("--java-output-version", Versions.minimumJVMVersion),
// Only publish compilation artifacts, no test artifacts
Compile / publishArtifact := true,
Test / publishArtifact := false,
Expand Down
6 changes: 6 additions & 0 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
object Versions {

/* The Minimum JVM version the artifact should be able to use */
val minimumJVMVersion = "17"

}
Loading