mirror of https://github.com/sbt/sbt.git
Merge pull request #8530 from eed3si9n/wip/scala-3.8.0
[2.x] deps: Update to Scala 3.8.1
This commit is contained in:
commit
ba8c340a2b
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
distribution: temurin
|
||||
jobtype: 1
|
||||
- os: ubuntu-latest
|
||||
java: 8
|
||||
java: 17
|
||||
distribution: zulu
|
||||
jobtype: 2
|
||||
- os: ubuntu-latest
|
||||
|
|
@ -41,15 +41,15 @@ jobs:
|
|||
distribution: zulu
|
||||
jobtype: 7
|
||||
- os: ubuntu-latest
|
||||
java: 11
|
||||
java: 17
|
||||
distribution: temurin
|
||||
jobtype: 10
|
||||
- os: ubuntu-latest
|
||||
java: 11
|
||||
java: 17
|
||||
distribution: temurin
|
||||
jobtype: 11
|
||||
- os: windows-latest
|
||||
java: 11
|
||||
java: 17
|
||||
distribution: temurin
|
||||
jobtype: 10
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
java: 8
|
||||
java: 17
|
||||
distribution: zulu
|
||||
- os: macos-latest
|
||||
java: 17
|
||||
distribution: temurin
|
||||
- os: windows-latest
|
||||
java: 8
|
||||
java: 17
|
||||
distribution: zulu
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
distribution: "zulu"
|
||||
java-version: |
|
||||
25
|
||||
8
|
||||
17
|
||||
cache: sbt
|
||||
- uses: sbt/setup-sbt@v1
|
||||
with:
|
||||
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
./client/target/bin/sbtn --sbt-script=$(pwd)/sbt about
|
||||
./client/target/bin/sbtn --sbt-script=$(pwd)/sbt shutdown
|
||||
# test launcher script
|
||||
echo build using JDK 8 test using JDK 8 and JDK 25
|
||||
echo build using JDK 17 test using JDK 17 and JDK 25
|
||||
sbt -Dsbt.build.version=$TEST_SBT_VER launcherPackage/Rpm/packageBin launcherPackage/Debian/packageBin
|
||||
sbt -Dsbt.build.version=$TEST_SBT_VER launcherPackageIntegrationTest/test
|
||||
cd launcher-package/citest && ./test.sh
|
||||
|
|
@ -94,7 +94,7 @@ jobs:
|
|||
./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat about
|
||||
./client/target/bin/sbtn --sbt-script=$(pwd)/launcher-package/src/universal/bin/sbt.bat shutdown
|
||||
# test launcher script
|
||||
echo build using JDK 8 test using JDK 8 and JDK 25
|
||||
echo build using JDK 17 test using JDK 17 and JDK 25
|
||||
launcher-package/bin/coursier.bat resolve
|
||||
sbt -Dsbt.build.version=$TEST_SBT_VER launcherPackageIntegrationTest/test
|
||||
cd launcher-package/citest
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: "8"
|
||||
java-version: "17"
|
||||
cache: sbt
|
||||
- uses: sbt/setup-sbt@v1
|
||||
- name: Server test
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
17.0
|
||||
|
|
@ -140,6 +140,7 @@ def mimaSettingsSince(versions: Seq[String]): Seq[Def.Setting[?]] = Def settings
|
|||
}
|
||||
},
|
||||
mimaBinaryIssueFilters ++= Seq(
|
||||
exclude[DirectMissingMethodProblem]("*"),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
@ -253,8 +254,7 @@ val completeProj = (project in file("internal") / "util-complete")
|
|||
libraryDependencies += jline3Builtins,
|
||||
mimaSettings,
|
||||
// Parser is used publicly, so we can't break bincompat.
|
||||
mimaBinaryIssueFilters := Seq(
|
||||
),
|
||||
// mimaBinaryIssueFilters := Seq(),
|
||||
)
|
||||
.configure(addSbtIO)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@ import dotty.tools.dotc.ast.tpd
|
|||
import dotty.tools.dotc.CompilationUnit
|
||||
import dotty.tools.dotc.core.Contexts.{ atPhase, Context }
|
||||
import dotty.tools.dotc.core.{ Flags, NameKinds, Names, Phases, Symbols, Types }
|
||||
import dotty.tools.dotc.core.Periods.Period
|
||||
import dotty.tools.dotc.Driver
|
||||
import dotty.tools.dotc.Run
|
||||
import dotty.tools.dotc.util.SourceFile
|
||||
import dotty.tools.io.{ PlainDirectory, Directory, VirtualDirectory, VirtualFile }
|
||||
import dotty.tools.repl.AbstractFileClassLoader
|
||||
import dotty.tools.io.AbstractFileClassLoader
|
||||
import java.io.File
|
||||
import java.net.URLClassLoader
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
|
@ -70,6 +71,7 @@ class Eval(
|
|||
case Some((_, ctx)) => ctx
|
||||
case _ => sys.error(s"initialization failed for $options")
|
||||
val compileCtx2 = compileCtx1.fresh
|
||||
.setPeriod(Period(2, 1)) // RunId 2 is the actually the first one in the compiler
|
||||
.setSetting(
|
||||
compileCtx1.settings.outputDir,
|
||||
outputDir
|
||||
|
|
@ -194,7 +196,12 @@ class Eval(
|
|||
override def extraHash: String = extraHash0
|
||||
|
||||
val inter = evalCommon[Seq[String]](definitions.map(_._1), imports, tpeName = Some(""), ev)
|
||||
EvalDefinitions(inter.loader, inter.generated, inter.enclosingModule, inter.extra.reverse)
|
||||
EvalDefinitions(
|
||||
inter.loader,
|
||||
inter.generated,
|
||||
inter.enclosingModule,
|
||||
inter.extra.reverse.distinct
|
||||
)
|
||||
|
||||
end evalDefinitions
|
||||
|
||||
|
|
@ -421,9 +428,10 @@ object Eval:
|
|||
if isTopLevelModule(tree.symbol.owner) && isAcceptableType(tpt.tpe) =>
|
||||
vals ::= name.mangledString
|
||||
case tpd.ValDef(name, tpt, _) if name.is(NameKinds.LazyLocalName) =>
|
||||
val methodName = name.underlying
|
||||
val m = tree.symbol.owner.requiredMethod(methodName)
|
||||
if isAcceptableType(m.info) then vals ::= methodName.mangledString
|
||||
val str = name.mangledString
|
||||
val methodName = str.take(str.indexOf("$lzy"))
|
||||
val m = tree.symbol.owner.requiredMethod(methodName.replace("$minus", "-"))
|
||||
if isAcceptableType(m.info) then vals ::= methodName
|
||||
case t: tpd.Template => this((), t.body)
|
||||
case t: tpd.PackageDef => this((), t.stats)
|
||||
case t: tpd.TypeDef => this((), t.rhs)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ package parser
|
|||
|
||||
import sbt.internal.util.{ LineRange, MessageOnlyException }
|
||||
import sbt.internal.io.Retry
|
||||
import java.io.File
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import sbt.internal.parser.SbtParser.*
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Create an initial build in `something`. Like a real build using sbt. I'm sure yo
|
|||
|
||||
```scala
|
||||
name := "foo"
|
||||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
```
|
||||
|
||||
I also have `Hello.scala`:
|
||||
|
|
@ -107,7 +107,7 @@ import scala.sys.process.Process
|
|||
lazy val check = taskKey[Unit]("check")
|
||||
|
||||
name := "foo"
|
||||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
check := {
|
||||
val pkg = (Compile / packageBin).value
|
||||
val conv = fileConverter.value
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $ sbt --server
|
|||
|
||||
### Clearing out boot and local cache
|
||||
|
||||
sbt consists of lots of JAR files. When running sbt locally, these JAR artifacts are cached in the `boot` directory under `$HOME/.sbt/boot/scala-3.7.4/org.scala-sbt/sbt/2.0.0-RC8-bin-SNAPSHOT` directory.
|
||||
sbt consists of lots of JAR files. When running sbt locally, these JAR artifacts are cached in the `boot` directory under `$HOME/.sbt/boot/scala-3.8.1/org.scala-sbt/sbt/2.0.0-RC8-bin-SNAPSHOT` directory (The Scala version and sbt version part changes).
|
||||
|
||||
In order to see a change you've made to sbt's source code, this cache MUST be cleared. To clear this out, from the sbt shell in your application run:
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ class FileCommands(baseDirectory: File) extends BasicStatementHandler {
|
|||
case paths =>
|
||||
val mapped = fromStrings(paths)
|
||||
val map = mapper(mapped.last)
|
||||
IO.copy(mapped.init pair map)
|
||||
IO.copy(mapped.init.pair(map))
|
||||
()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ lazy val check2 = taskKey[Unit]("")
|
|||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion := "3.7.3",
|
||||
scalaVersion := "3.8.1",
|
||||
name := "Hello",
|
||||
libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test,
|
||||
testFrameworks += new TestFramework("verify.runner.Framework"),
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import lmcoursier.definitions.{
|
|||
Type
|
||||
}
|
||||
import sbt.internal.librarymanagement.mavenint.SbtPomExtraProperties
|
||||
import sbt.librarymanagement.{ Configuration as _, MavenRepository as _, * }
|
||||
import sbt.librarymanagement.{ Configuration as _, * }
|
||||
|
||||
object FromSbt {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import coursier.core.{ Authentication, Repository }
|
|||
import coursier.ivy.IvyRepository
|
||||
import coursier.maven.SbtMavenRepository
|
||||
import org.apache.ivy.plugins.resolver.IBiblioResolver
|
||||
import sbt.librarymanagement.{ Configuration as _, MavenRepository as _, * }
|
||||
import sbt.librarymanagement.*
|
||||
import sbt.util.Logger
|
||||
|
||||
import scala.jdk.CollectionConverters.*
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class LockFileSpec extends AnyFunSuite {
|
|||
),
|
||||
metadata = LockFileMetadata(
|
||||
sbtVersion = "2.0.0",
|
||||
scalaVersion = Some("3.7.4")
|
||||
scalaVersion = Some("3.8.1")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ class LockFileSpec extends AnyFunSuite {
|
|||
assert(readData.configurations.head.dependencies.head.organization == "org.scala-lang")
|
||||
assert(readData.configurations.head.dependencies.head.version == "2.13.16")
|
||||
assert(readData.metadata.sbtVersion == "2.0.0")
|
||||
assert(readData.metadata.scalaVersion == Some("3.7.4"))
|
||||
assert(readData.metadata.scalaVersion == Some("3.8.1"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.librarymanagement.*
|
||||
import sbt.librarymanagement.syntax.*
|
||||
import sbt.internal.librarymanagement.ivy.UpdateOptions
|
||||
|
||||
object ModuleResolversTest extends BaseIvySpecification {
|
||||
override final val resolvers = Vector(
|
||||
MavenRepository(
|
||||
"JFrog OSS Releases",
|
||||
"https://releases.jfrog.io/artifactory/oss-releases/"
|
||||
),
|
||||
Resolver.sbtPluginRepo("releases")
|
||||
)
|
||||
|
||||
private final val stubModule = "com.example" % "foo" % "0.1.0" % "compile"
|
||||
val pluginAttributes = Map("sbtVersion" -> "0.13", "scalaVersion" -> "2.10")
|
||||
private final val dependencies = Vector(
|
||||
("me.lessis" % "bintray-sbt" % "0.3.0" % "compile").withExtraAttributes(pluginAttributes),
|
||||
"com.jfrog.bintray.client" % "bintray-client-java-api" % "0.9.2" % "compile"
|
||||
).map(_.withIsTransitive(false))
|
||||
|
||||
test("The direct resolvers in update options should skip the rest of resolvers") {
|
||||
cleanIvyCache()
|
||||
val updateOptions = UpdateOptions()
|
||||
val ivyModule = module(stubModule, dependencies, None, updateOptions)
|
||||
val normalResolution = ivyUpdateEither(ivyModule)
|
||||
assert(normalResolution.isRight)
|
||||
val normalResolutionTime =
|
||||
normalResolution.fold(e => throw e.resolveException, identity).stats.resolveTime
|
||||
|
||||
cleanIvyCache()
|
||||
val moduleResolvers = Map(
|
||||
dependencies.head -> resolvers.last,
|
||||
dependencies.tail.head -> resolvers.init.last
|
||||
)
|
||||
val customUpdateOptions = updateOptions.withModuleResolvers(moduleResolvers)
|
||||
val ivyModule2 = module(stubModule, dependencies, None, customUpdateOptions)
|
||||
val fasterResolution = ivyUpdateEither(ivyModule2)
|
||||
assert(fasterResolution.isRight)
|
||||
val fasterResolutionTime =
|
||||
fasterResolution.fold(e => throw e.resolveException, identity).stats.resolveTime
|
||||
|
||||
// THis is left on purpose so that in spurious error we see the times
|
||||
println(s"NORMAL RESOLUTION TIME $normalResolutionTime")
|
||||
println(s"FASTER RESOLUTION TIME $fasterResolutionTime")
|
||||
|
||||
// Check that faster resolution is faster
|
||||
assert(fasterResolutionTime < normalResolutionTime)
|
||||
}
|
||||
}
|
||||
|
|
@ -49,8 +49,8 @@ object Mapper:
|
|||
*/
|
||||
def directory(baseDirectory: File)(using conv: FileConverter): Seq[(VirtualFile, String)] =
|
||||
Option(baseDirectory.getParentFile)
|
||||
.map(parent => PathFinder(baseDirectory).allPaths pair relativeTo(parent))
|
||||
.getOrElse(PathFinder(baseDirectory).allPaths pair basic)
|
||||
.map(parent => PathFinder(baseDirectory).allPaths.pair(relativeTo(parent)))
|
||||
.getOrElse(PathFinder(baseDirectory).allPaths.pair(basic))
|
||||
.map { (f, s) => conv.toVirtualFile(f.toPath) -> s }
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ case object ThisProject extends ProjectReference
|
|||
case object LocalAggregate extends ProjectReference
|
||||
|
||||
object ProjectRef {
|
||||
def apply(base: File, id: String): ProjectRef = ProjectRef(IO toURI base, id)
|
||||
def apply(base: File, id: String): ProjectRef = ProjectRef(IO.toURI(base), id)
|
||||
}
|
||||
object RootProject {
|
||||
|
||||
/** Reference to the root project at 'base'. */
|
||||
def apply(base: File): RootProject = RootProject(IO toURI base)
|
||||
def apply(base: File): RootProject = RootProject(IO.toURI(base))
|
||||
}
|
||||
object Reference {
|
||||
given resolvedReferenceOrdering: Ordering[ResolvedReference] = {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import java.io.File
|
|||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
import sbt.Def.{ ScopedKey, Setting, dummyState }
|
||||
import sbt.Keys.{ TaskProgress as _, name as _, * }
|
||||
import sbt.Keys.{ name as _, * }
|
||||
import sbt.BuildExtra.*
|
||||
import sbt.ProjectExtra.*
|
||||
import sbt.Scope.Global
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ private[sbt] object PluginCross {
|
|||
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
|
||||
case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.7"
|
||||
case VersionNumber(Seq(1, 0, _*), _, _) => "2.12.21"
|
||||
case VersionNumber(Seq(2, _*), _, _) => "3.7.4"
|
||||
case VersionNumber(Seq(2, _*), _, _) => "3.8.1"
|
||||
case _ => sys.error(s"Unsupported sbt binary version: $sv")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import java.io.{ ByteArrayInputStream, IOException, InputStream, File as _ }
|
||||
import java.io.{ ByteArrayInputStream, IOException, InputStream }
|
||||
import java.nio.file.Path
|
||||
import java.util.concurrent.{
|
||||
ConcurrentHashMap,
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import java.nio.file.{ WatchService as _ }
|
||||
|
||||
import sbt.nio.FileStamper
|
||||
import sbt.nio.file.Glob
|
||||
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ private[sbt] object Load {
|
|||
if (base.isFile)
|
||||
sys.error("Not a directory: " + base)
|
||||
else if (!base.exists)
|
||||
IO createDirectory base
|
||||
IO.createDirectory(base)
|
||||
}
|
||||
|
||||
def checkAll(
|
||||
|
|
@ -1073,7 +1073,7 @@ private[sbt] object Load {
|
|||
val newProjects = rest ++ discovered ++ projectLevelExtra
|
||||
val newAcc = acc :+ finalRoot
|
||||
val newGenerated = generated ++ generatedConfigClassFiles
|
||||
loadTransitive1(newProjects, newAcc, newGenerated, finalRoot.commonSettings)
|
||||
loadTransitive1(newProjects, newAcc, newGenerated, commonSettings)
|
||||
}
|
||||
|
||||
// Load all config files AND process the project at the root directory, if it exists.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import sbt.util.Show
|
|||
import java.io.File
|
||||
|
||||
import Def.{ ScopedKey, compiled, flattenLocals }
|
||||
import Predef.{ any2stringadd as _, * }
|
||||
import sbt.ProjectExtra.scopedKeyData
|
||||
import sbt.io.IO
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Keys.*
|
|||
object Dependencies {
|
||||
// WARNING: Please Scala update versions in PluginCross.scala too
|
||||
val scala213 = "2.13.16"
|
||||
val scala3 = "3.7.4"
|
||||
val scala3 = "3.8.1"
|
||||
val scala212 = "2.12.21"
|
||||
val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up")
|
||||
val baseScalaVersion = scala3
|
||||
|
|
@ -13,7 +13,7 @@ object Dependencies {
|
|||
|
||||
// sbt modules
|
||||
val ioVersion = nightlyVersion.getOrElse("1.10.5")
|
||||
val zincVersion = nightlyVersion.getOrElse("2.0.0-M11")
|
||||
val zincVersion = nightlyVersion.getOrElse("2.0.0-M13")
|
||||
|
||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
sbt.version=1.11.6
|
||||
sbt.version=1.12.0
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ lazy val checkMiss = inputKey[Unit]("")
|
|||
|
||||
Global / localCacheDirectory := baseDirectory.value / "diskcache"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
checkMiss := {
|
||||
val expected: Int = (Space ~> NatBasic).parsed
|
||||
val s = streams.value
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ lazy val verify = "com.eed3si9n.verify" %% "verify" % "1.0.0"
|
|||
|
||||
Global / localCacheDirectory := baseDirectory.value / "diskcache"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
libraryDependencies += verify % Test
|
||||
testFrameworks += new TestFramework("verify.runner.Framework")
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import java.nio.file.Files
|
|||
|
||||
name := "clean-symlinks-test"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
TaskKey[Unit]("createSymlinkedDirectory") := {
|
||||
IO.createDirectory(target.value)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
> createSymlinkedDirectory
|
||||
|
||||
$ exists target/out/jvm/scala-3.7.3/clean-symlinks-test/foo/bar
|
||||
$ exists target/out/jvm/scala-3.8.1/clean-symlinks-test/foo/bar
|
||||
$ exists foo/bar
|
||||
|
||||
> clean
|
||||
|
||||
$ absent target/out/jvm/scala-3.7.3/clean-symlinks-test/foo
|
||||
$ absent target/out/jvm/scala-3.8.1/clean-symlinks-test/foo
|
||||
$ exists foo/bar
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
organization := "com.example"
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
|
||||
libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-pgp" % "2.3.1", "2", "3.7.3")
|
||||
libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-pgp" % "2.3.1", "2", "3.8.1")
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ lazy val plugin = (projectMatrix in file("plugin"))
|
|||
case _ => "2.0.0-RC3"
|
||||
},
|
||||
)
|
||||
.jvmPlatform(scalaVersions = Seq("3.7.3", "2.12.21"))
|
||||
.jvmPlatform(scalaVersions = Seq("3.8.1", "2.12.21"))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ThisBuild / scalaVersion := "3.7.4"
|
||||
ThisBuild / scalaVersion := "3.8.1"
|
||||
|
||||
name := "hello"
|
||||
enablePlugins(JavaAppPackaging)
|
||||
|
|
@ -6,7 +6,7 @@ enablePlugins(JavaAppPackaging)
|
|||
lazy val check = taskKey[Unit]("")
|
||||
|
||||
check := {
|
||||
val cmd = "target/out/jvm/scala-3.7.4/hello/universal/stage/bin/hello"
|
||||
val cmd = "target/out/jvm/scala-3.8.1/hello/universal/stage/bin/hello"
|
||||
val cmd0 =
|
||||
if (sys.props("os.name").toLowerCase(java.util.Locale.ROOT).contains("windows"))
|
||||
cmd + ".bat"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
|
||||
|
||||
// addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.20")
|
||||
libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-native-packager" % "1.11.4", "2", "3.7.3")
|
||||
libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-native-packager" % "1.11.4", "2", "3.8.1")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
@deprecated
|
||||
def foo = true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
@deprecated
|
||||
def foo = true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
lazy val scala3_LTS = "3.3.5"
|
||||
lazy val scala3_current = "3.7.4"
|
||||
lazy val scala3_current = "3.8.1"
|
||||
lazy val check = taskKey[Unit]("")
|
||||
|
||||
organization := "com.example"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
> packageBin
|
||||
$ exists target/**/app_3.3.5-0.1.0-SNAPSHOT.jar
|
||||
$ exists target/**/app_3.7.4-0.1.0-SNAPSHOT.jar
|
||||
> core3_7_4/check
|
||||
$ exists target/**/app_3.8.1-0.1.0-SNAPSHOT.jar
|
||||
> core3_8_1/check
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ check := {
|
|||
assert((bar / scalaVersion).value == scala212)
|
||||
assert((baz / scalaVersion).value == scala212)
|
||||
|
||||
assert((root / organization).value == o)
|
||||
assert((foo / organization).value == o)
|
||||
assert((root / organization).value == o, s"(root / organization).value: ${(root / organization).value}")
|
||||
assert((foo / organization).value == o, s"(foo / organization).value: ${(foo / organization).value}")
|
||||
// Test that bar can override common setting in settings(...)
|
||||
assert((bar / organization).value == "com.example.bar")
|
||||
// Test that baz/build.sbt bare settings get loaded
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
lazy val a1 = settingKey[Boolean]("")
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
a1 := true
|
||||
|
||||
Compile / sourceGenerators += {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
scalaVersion := "3.7.4"
|
||||
scalaVersion := "3.8.1"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ lazy val intsSetting2 = Def.setting {
|
|||
Seq(1, 2, 3)
|
||||
}
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
intsTask := Seq(1, 2, 3, 4, 5, 6, 7)
|
||||
intsTask -= 3
|
||||
|
|
@ -30,10 +30,10 @@ intsSetting -= intSetting2.value
|
|||
intsSetting --= intsSetting2.value
|
||||
|
||||
intsFromScalaV := Seq(1, 2, 3, 4, 5, 6, 7)
|
||||
intsFromScalaV -= { if scalaVersion.value == "3.7.3" then 3 else 5 }
|
||||
intsFromScalaV --= { if scalaVersion.value == "3.7.3" then Seq(1, 2) else Seq(4) }
|
||||
intsFromScalaV -= { if scalaVersion.value == "3.7.3" then Option(6) else None }
|
||||
intsFromScalaV --= { if scalaVersion.value == "3.7.3" then Option(7) else None }
|
||||
intsFromScalaV -= { if scalaVersion.value == "3.8.1" then 3 else 5 }
|
||||
intsFromScalaV --= { if scalaVersion.value == "3.8.1" then Seq(1, 2) else Seq(4) }
|
||||
intsFromScalaV -= { if scalaVersion.value == "3.8.1" then Option(6) else None }
|
||||
intsFromScalaV --= { if scalaVersion.value == "3.8.1" then Option(7) else None }
|
||||
|
||||
intsSetSetting := Set(1, 2, 3, 4, 5, 6, 7)
|
||||
intsSetSetting -= 3
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
val scalatest = "org.scalatest" %% "scalatest" % "3.2.19"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
Test / fork := true
|
||||
libraryDependencies += scalatest % Test
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
val scalatest = "org.scalatest" %% "scalatest" % "3.2.19"
|
||||
|
||||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
fork := true
|
||||
libraryDependencies += scalatest % Test
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test
|
||||
testFrameworks += new TestFramework("verify.runner.Framework")
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ val marker = new File("marker")
|
|||
val check = TaskKey[Unit]("check", "Check correct error has been returned.")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.2.19"
|
||||
|
||||
ThisBuild / scalaVersion := "3.7.3"
|
||||
ThisBuild / scalaVersion := "3.8.1"
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
scalaVersion := "3.7.3"
|
||||
scalaVersion := "3.8.1"
|
||||
|
||||
TaskKey[Unit]("willSucceed") := println("success")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue