-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
97 lines (84 loc) · 3.2 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
name := "scala-repl-pp-root"
publish/skip := true
ThisBuild / organization := "com.michaelpollmeier"
ThisBuild / scalaVersion := "3.5.2"
lazy val ScalaTestVersion = "3.2.18"
lazy val Slf4jVersion = "2.0.16"
lazy val shadedLibs = project.in(file("shaded-libs"))
.settings(
name := "scala-repl-pp-shaded-libs",
Compile/compile/scalacOptions ++= Seq(
"-language:implicitConversions",
"-Wconf:any:silent", // silence warnings from shaded libraries
"-explain"
),
Compile/doc/scalacOptions += "-nowarn",
)
lazy val core = project.in(file("core"))
.dependsOn(shadedLibs)
.enablePlugins(JavaAppPackaging)
.settings(
name := "scala-repl-pp",
Compile/mainClass := Some("replpp.Main"),
executableScriptName := "srp",
libraryDependencies ++= Seq(
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value,
"org.slf4j" % "slf4j-simple" % Slf4jVersion % Optional,
),
assemblyJarName := "srp.jar", // TODO remove the '.jar' suffix - when doing so, it doesn't work any longer
)
lazy val server = project.in(file("server"))
.dependsOn(core)
.enablePlugins(JavaAppPackaging)
.settings(
name := "scala-repl-pp-server",
executableScriptName := "srp-server",
Compile/mainClass := Some("replpp.server.Main"),
fork := true, // important: otherwise we run into classloader issues
libraryDependencies ++= Seq(
"com.lihaoyi" %% "cask" % "0.9.5",
"org.slf4j" % "slf4j-simple" % Slf4jVersion % Optional,
"com.lihaoyi" %% "requests" % "0.8.2" % Test,
)
)
lazy val integrationTests = project.in(file("integration-tests"))
.dependsOn(server)
.settings(
name := "integration-tests",
fork := true, // important: otherwise we run into classloader issues
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-simple" % Slf4jVersion % Optional,
"org.scalatest" %% "scalatest" % ScalaTestVersion % Test,
)
)
ThisBuild / libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % ScalaTestVersion % Test,
"com.lihaoyi" %% "os-lib" % "0.9.1" % Test,
)
ThisBuild / javacOptions ++= Seq(
"-g", //debug symbols
"--release", "11"
)
ThisBuild / scalacOptions ++= Seq(
"-release", "11",
"-deprecation",
"-feature",
)
ThisBuild/Test/fork := false
ThisBuild/resolvers += Resolver.mavenLocal
Global/onChangedBuildSource := ReloadOnSourceChanges
ThisBuild/assemblyMergeStrategy := {
case "META-INF/versions/9/module-info.class" => MergeStrategy.first
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
ThisBuild/assemblyPrependShellScript := Some(sbtassembly.AssemblyPlugin.defaultShellScript)
ThisBuild/publishTo := sonatypePublishToBundle.value
ThisBuild/scmInfo := Some(ScmInfo(url("https://github.com/mpollmeier/scala-repl-pp"),
"scm:git@github.com:mpollmeier/scala-repl-pp.git"))
ThisBuild/homepage := Some(url("https://github.com/mpollmeier/scala-repl-pp/"))
ThisBuild/licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
ThisBuild/developers := List(
Developer("mpollmeier", "Michael Pollmeier", "michael@michaelpollmeier.com", url("http://www.michaelpollmeier.com/"))
)