-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
87 lines (75 loc) · 2.84 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
name := "scala-repl-pp-root"
publish/skip := true
ThisBuild / organization := "com.michaelpollmeier"
ThisBuild / scalaVersion := "3.4.3"
lazy val ScalaTestVersion = "3.2.18"
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" % "2.0.16" % 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)
.configs(IntegrationTest)
.enablePlugins(JavaAppPackaging)
.settings(
name := "scala-repl-pp-server",
executableScriptName := "srp-server",
Compile/mainClass := Some("replpp.server.Main"),
Defaults.itSettings,
fork := true, // important: otherwise we run into classloader issues
libraryDependencies ++= Seq(
"com.lihaoyi" %% "cask" % "0.8.3",
"com.lihaoyi" %% "requests" % "0.8.2" % Test,
"org.scalatest" %% "scalatest" % ScalaTestVersion % "it",
)
)
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:[email protected]: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", "[email protected]", url("http://www.michaelpollmeier.com/"))
)