forked from cross-language-cpp/djinni-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
36 lines (32 loc) · 1.64 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
import sbtassembly.AssemblyPlugin.defaultUniversalScript
ThisBuild / scalaVersion := "2.12.18"
ThisBuild / organization := "com.github.cross-language-cpp"
ThisBuild / semanticdbEnabled := true // enable SemanticDB
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision // use Scalafix compatible version
// Keep this as a reminder, we will use that later
// ThisBuild / scalacOptions += "-Ywarn-unused"
// us: sbt 'set ThisBuild / scalacOptions += "-Ywarn-unused"' scalafix
// until the last 2 unused warnings are fixed
ThisBuild / scalacOptions ++= Seq("-deprecation", "-unchecked")
val binExt = if (System.getProperty("os.name").startsWith("Windows")) ".bat" else ""
lazy val djinni = (project in file("."))
.configs(IntegrationTest)
.enablePlugins(ScalafixPlugin) // enable Scalafix for this project
.settings(
name := "djinni",
Defaults.itSettings,
libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.10",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "it,test",
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.0",
libraryDependencies += "org.yaml" % "snakeyaml" % "1.29",
libraryDependencies += "com.github.scopt" %% "scopt" % "4.0.1",
libraryDependencies += "commons-io" % "commons-io" % "2.11.0",
assembly / assemblyOutputPath := {
val dir = file("target/bin")
IO.createDirectory(dir)
dir / s"${(assembly / assemblyJarName).value}${binExt}"
},
assembly / assemblyJarName := s"${name.value}",
assembly / assemblyPrependShellScript := Some(defaultUniversalScript(shebang = binExt.isEmpty)),
assembly / test := {}
)