diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70dcda65..67e00468 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.14', '2.13.6', '3.2.1'] + scala: ['2.12.17', '2.13.10', '3.2.1'] platform: ['JVM', 'JS'] steps: - name: Checkout current branch diff --git a/build.sbt b/build.sbt index 99aa809c..e8f59dbd 100644 --- a/build.sbt +++ b/build.sbt @@ -53,7 +53,7 @@ val catsEffectVersion = "3.4.4" val catsMtlVersion = "1.3.0" val disciplineScalaTestVersion = "2.2.0" val fs2Version = "3.4.0" -val scalaJavaTimeVersion = "2.3.0" +val scalaJavaTimeVersion = "2.5.0" lazy val zioInteropCats = crossProject(JSPlatform, JVMPlatform) .in(file("zio-interop-cats")) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index cc9a127f..73174eab 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -7,10 +7,10 @@ import sbtbuildinfo._ import BuildInfoKeys._ object BuildHelper { - val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.15.4" % Test) + val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.17.0" % Test) - val Scala212 = "2.12.14" - val Scala213 = "2.13.6" + val Scala212 = "2.12.17" + val Scala213 = "2.13.10" val Scala3 = "3.2.1" private val stdOptions = Seq( diff --git a/project/plugins.sbt b/project/plugins.sbt index c7d92304..29146743 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,10 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") -addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") +addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.6") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") diff --git a/sbt b/sbt index 11a73fbc..4117a998 100755 --- a/sbt +++ b/sbt @@ -34,11 +34,11 @@ set -o pipefail -declare -r sbt_release_version="1.3.13" -declare -r sbt_unreleased_version="1.4.0-M1" +declare -r sbt_release_version="1.8.2" +declare -r sbt_unreleased_version="1.8.2" -declare -r latest_213="2.13.3" -declare -r latest_212="2.12.12" +declare -r latest_213="2.13.10" +declare -r latest_212="2.12.17" declare -r latest_211="2.11.12" declare -r latest_210="2.10.7" declare -r latest_29="2.9.3" @@ -48,7 +48,7 @@ declare -r buildProps="project/build.properties" declare -r sbt_launch_ivy_release_repo="https://repo.typesafe.com/typesafe/ivy-releases" declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots" -declare -r sbt_launch_mvn_release_repo="https://repo.scala-sbt.org/scalasbt/maven-releases" +declare -r sbt_launch_mvn_release_repo="https://repo1.maven.org/maven2" declare -r sbt_launch_mvn_snapshot_repo="https://repo.scala-sbt.org/scalasbt/maven-snapshots" declare -r default_jvm_opts_common="-Xms512m -Xss2m -XX:MaxInlineLevel=18" @@ -216,7 +216,8 @@ getJavaVersion() { # but on 9 and 10 it's 9.x.y and 10.x.y. if [[ "$str" =~ ^1\.([0-9]+)(\..*)?$ ]]; then echo "${BASH_REMATCH[1]}" - elif [[ "$str" =~ ^([0-9]+)(\..*)?$ ]]; then + # Fixes https://github.com/dwijnand/sbt-extras/issues/326 + elif [[ "$str" =~ ^([0-9]+)(\..*)?(-ea)?$ ]]; then echo "${BASH_REMATCH[1]}" elif [[ -n "$str" ]]; then echoerr "Can't parse java version from: $str" @@ -247,11 +248,20 @@ java_version() { echo "$version" } +is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]; } + # MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+ default_jvm_opts() { local -r v="$(java_version)" - if [[ $v -ge 10 ]]; then - echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler" + if [[ $v -ge 17 ]]; then + echo "$default_jvm_opts_common" + elif [[ $v -ge 10 ]]; then + if is_apple_silicon; then + # As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI + echo "$default_jvm_opts_common" + else + echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler" + fi elif [[ $v -ge 8 ]]; then echo "$default_jvm_opts_common" else @@ -471,7 +481,7 @@ process_args() { -trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;; -debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;; - -no-colors) addJava "-Dsbt.log.noformat=true" && shift ;; + -no-colors) addJava "-Dsbt.log.noformat=true" && addJava "-Dsbt.color=false" && shift ;; -sbt-create) sbt_create=true && shift ;; -sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;; -sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;; @@ -652,3 +662,4 @@ execRunner "$java_cmd" \ -jar "$sbt_jar" \ "${sbt_commands[@]}" \ "${residual_args[@]}" + \ No newline at end of file