-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.sbt
38 lines (29 loc) · 1.21 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Project name
name := "ProScalaFX"
// Current version
version := "22.0.0-R33"
// Version of scala to use
val scala2Version = "2.13.14"
val scala3Version = "3.3.3"
// To cross compile with Scala 2 and Scala 3
crossScalaVersions := Seq(scala2Version, scala3Version)
scalaVersion := scala3Version
// Set the main Scala source directory to be <base>/src
Compile / scalaSource := baseDirectory(_ / "src").value
Compile / resourceDirectory := baseDirectory(_ / "src").value
// Append -deprecation to the options passed to the Scala compiler
scalacOptions ++= Seq("-deprecation", "-feature")
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq("-Xcheckinit", "-Xsource:3")
case Some((3, _)) => Seq("-rewrite", "-source:3.3-migration", "-explain", "-explain-types")
case _ => Seq.empty[String]
}
}
// Point to location of a snapshot repository for ScalaFX
resolvers ++= Opts.resolver.sonatypeOssSnapshots
//resolvers += Opts.resolver.sonatypeStaging
// Add ScalaFX dependency, exclude JavaFX transitive dependencies, may not mach this OS
libraryDependencies += "org.scalafx" %% "scalafx" % "22.0.0-R33"
// Fork a new JVM for 'run' and 'test:run'
fork := true