Skip to content

Commit

Permalink
set release to target jvm 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijsBroersen committed Oct 6, 2024
1 parent b5c4abc commit 64934ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
java: ['17']
scala: ['2.12.20', '2.13.15', '3.4.3']
scala: ['2.12.x', '2.13.x', '3.x']
platform: ['JS', 'JVM', 'Native']
steps:
- name: Checkout current branch
Expand Down
25 changes: 8 additions & 17 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,20 @@ import scalafix.sbt.ScalafixPlugin.autoImport._
import sbtprojectmatrix.ProjectMatrixKeys.virtualAxes

object BuildHelper {
private val versions: String => String = {
import org.snakeyaml.engine.v2.api.{Load, LoadSettings}
val Scala212: String = "2.12.20"
val Scala213: String = "2.13.15"
val Scala3: String = "3.4.3"

import java.util.{List => JList, Map => JMap}
import scala.jdk.CollectionConverters._

val doc = new Load(LoadSettings.builder().build())
.loadFromReader(scala.io.Source.fromFile(".github/workflows/ci.yml").bufferedReader())
val yaml = doc.asInstanceOf[JMap[String, JMap[String, JMap[String, JMap[String, JMap[String, JList[String]]]]]]]
val list = yaml.get("jobs").get("test").get("strategy").get("matrix").get("scala").asScala
val map = list.map(v => (v.split('.').take(2).mkString("."), v)).toMap

(prefix: String) => map.find(_._1.startsWith(prefix)).map(_._2).get
}
val Scala212: String = versions("2.12")
val Scala213: String = versions("2.13")
val Scala3: String = versions("3.4")
val JdkReleaseVersion: String = "11"

private val stdOptions = Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-unchecked"
"-unchecked",
"-release",
JdkReleaseVersion
) ++
Seq("-Xfatal-warnings")

Expand Down Expand Up @@ -248,6 +238,7 @@ object BuildHelper {
|${item("fmt")} - Formats source files using scalafmt
|${item("testJVM")} - Runs all JVM tests
|${item("testJS")} - Runs all ScalaJS tests
|${item("testNative")} - Runs all Scala Native tests
|${item("testOnly *.YourSpec -- -t \"YourLabel\"")} - Only runs tests with matching term e.g.
|${item("docs/docusaurusCreateSite")} - Generates the ZIO microsite
""".stripMargin
Expand Down

0 comments on commit 64934ca

Please sign in to comment.