From 19f9d0a2588c8de0b391008568d7ed188ad0be4c Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 27 Oct 2024 08:36:59 +0100 Subject: [PATCH] Cross-build for sbt 2.0.0-M2 --- .github/workflows/build.yml | 2 +- build.sbt | 11 ++++++++++- .../scala/au/com/onegeek/sbtdotenv/SbtDotenv.scala | 2 +- .../sbt-dotenv/check-load-on-demand-dot-env/test | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8033b5e..fb39701 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,4 +14,4 @@ jobs: distribution: temurin java-version: 8 - name: Run tests - run: sbt clean test scripted + run: sbt clean +test +scripted diff --git a/build.sbt b/build.sbt index b07be12..be4cdc4 100644 --- a/build.sbt +++ b/build.sbt @@ -21,7 +21,16 @@ developers := List( ) enablePlugins(SbtPlugin) -pluginCrossBuild / sbtVersion := "1.3.9" // minimum version we target because of using Native.load, see https://github.com/Philippus/sbt-dotenv/issues/81 + +scalaVersion := "2.12.20" +crossScalaVersions += "3.3.4" + +pluginCrossBuild / sbtVersion := { + scalaBinaryVersion.value match { + case "2.12" => "1.10.3" + case _ => "2.0.0-M2" + } +} libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.19" % Test diff --git a/src/main/scala/au/com/onegeek/sbtdotenv/SbtDotenv.scala b/src/main/scala/au/com/onegeek/sbtdotenv/SbtDotenv.scala index e2b4038..dcabb8b 100644 --- a/src/main/scala/au/com/onegeek/sbtdotenv/SbtDotenv.scala +++ b/src/main/scala/au/com/onegeek/sbtdotenv/SbtDotenv.scala @@ -27,7 +27,7 @@ import scala.io.Source * * Reads a file */ -object SbtDotenv extends AutoPlugin { +object SbtDotenv extends AutoPlugin with SlashSyntax { object autoImport { lazy val envFileName = diff --git a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/test b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/test index 0e33932..4c63418 100644 --- a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/test +++ b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/test @@ -8,7 +8,7 @@ > checkTest -> it:test +> IntegrationTest / test > checkIntegrationTest