forked from VirtusLab/scala-yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
97 lines (89 loc) · 3.03 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import BuildHelper._
def scala3Version = "3.1.0"
def projectName = "scala-yaml"
def localSnapshotVersion = "0.0.5-SNAPSHOT"
def isCI = System.getenv("CI") != null
inThisBuild(
List(
organization := "org.virtuslab",
scalaVersion := scala3Version,
version ~= { dynVer =>
if (isCI) dynVer
else localSnapshotVersion // only for local publishing
},
homepage := Some(url("https://github.com/VirtusLab/scala-yaml")),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"lwronski",
"Łukasz Wroński",
url("https://github.com/lwronski")
),
Developer(
"kpodsiad",
"Kamil Podsiadło",
url("https://github.com/kpodsiad")
)
)
)
)
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0"
lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.crossType(CrossType.Full)
.withoutSuffixFor(JVMPlatform)
.settings(
name := projectName,
scalaVersion := scala3Version,
semanticdbEnabled := true,
libraryDependencies ++= Seq(Deps.pprint % Test),
// see https://github.com/scala-native/scala-native/blob/master/docs/changelog/0.4.3-RC1.md#cannot-create-documentation-using-scaladoc-in-scala-native-sbt-project
Compile / doc / scalacOptions ~= { options =>
options.filterNot(_.startsWith("-Xplugin"))
}
)
.jsSettings(
libraryDependencies ++= List(
"org.scalameta" %%% "munit" % "0.7.29" % Test,
("org.scala-js" %% "scalajs-test-interface" % scalaJSVersion % Test)
.cross(CrossVersion.for3Use2_13),
("org.scala-js" %% "scalajs-junit-test-runtime" % scalaJSVersion % Test)
.cross(CrossVersion.for3Use2_13)
)
)
.nativeSettings(
// skip native tests for now since upstream changes in munit are required
Test / compile / skip := true,
Test / test / skip := true,
// set dummy directory with tests to avoid unnecessary errors
Test / unmanagedSourceDirectories := Nil
// libraryDependencies ++= List(
// ("org.scalameta" %% "munit" % "0.7.29" % Test).cross(CrossVersion.for3Use2_13),
// ("org.scala-native" %%% "test-interface" % nativeVersion % Test).cross(CrossVersion.for3Use2_13),
// ),
)
.settings(docsSettings)
.jvmSettings(
libraryDependencies ++= List(
"org.scalameta" %% "munit" % "0.7.29" % Test
)
)
lazy val integration = project
.in(file("integration-tests"))
.dependsOn(core.jvm)
.settings(
name := "integration",
moduleName := "integration",
scalaVersion := scala3Version,
semanticdbEnabled := true,
publish / skip := true,
libraryDependencies ++= List(
"org.scalameta" %% "munit" % "0.7.29",
"com.lihaoyi" %% "os-lib" % "0.8.0",
"com.lihaoyi" %% "pprint" % "0.7.1"
)
)
.settings(docsSettings)