forked from neuvector/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
126 lines (112 loc) · 4.68 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import com.scalapenos.sbt.prompt.SbtPrompt.autoImport._
import sbt.Keys.watchSources
import ExternalDependencies._
import sbt.Keys._
import sbt._
ThisBuild / version := "1.0"
ThisBuild / scalaVersion := "2.11.12"
ThisBuild / organization := "com.neuvector"
ThisBuild / scalafmtOnCompile := true
ThisBuild / Test / fork := true
ThisBuild / Test / parallelExecution := true
lazy val promptSettings = Seq(
description :=
"""NeuVector Security Center""".stripMargin,
homepage := Some(url("https://github.com/neuvector/manager")),
promptTheme := ScalapenosTheme
)
lazy val buildSettings = Seq(
Compile / scalacOptions ++= Seq(
"-encoding",
"UTF-8", // source files are in UTF-8
"-deprecation", // warn about use of deprecated APIs
"-unchecked", // warn about unchecked type parameters
"-feature", // warn about misused language features
"-language:higherKinds", // allow higher kinded types without `import scala.language.higherKinds`
"-Xlint", // enable handy linter warnings
"-Ypartial-unification" // allow the compiler to unify type constructors of different arities
),
Compile / console / scalacOptions --= Seq("-Ywarn-unused", "-Ywarn-unused-import")
)
lazy val commonDependencies = Seq(
scalaTest,
"javax.activation" % "activation" % "1.1",
"org.glassfish.jaxb" % "jaxb-runtime" % "2.3.0",
"javax.xml.bind" % "jaxb-api" % "2.3.0",
"com.sun.xml.ws" % "jaxws-ri" % "2.3.3",
"javax.xml.soap" % "javax.xml.soap-api" % "1.4.0",
"org.json4s" %% "json4s-native" % "3.6.10",
"org.bouncycastle" % "bcprov-jdk15on" % "1.70",
"org.bouncycastle" % "bcpkix-jdk15on" % "1.70",
akka,
typesafeConfig,
joda,
slf4jLog4j,
scalaLogging,
sprayJson,
ehCache,
guava,
// https://mvnrepository.com/artifact/org.apache.commons/commons-csv
"org.apache.commons" % "commons-csv" % "1.9.0"
)
lazy val buil1dSettings = Defaults.coreDefaultSettings ++ Seq(
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-target:jvm-1.7"),
libraryDependencies := Seq(scalaTest),
libraryDependencies += "javax.activation" % "activation" % "1.1",
libraryDependencies += "org.glassfish.jaxb" % "jaxb-runtime" % "2.3.0",
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.0",
libraryDependencies += "com.sun.xml.ws" % "jaxws-ri" % "2.3.3",
libraryDependencies += "javax.xml.soap" % "javax.xml.soap-api" % "1.4.0",
libraryDependencies += "org.json4s" %% "json4s-native" % "3.6.10"
)
lazy val manager = (project in file("."))
.aggregate(common, admin)
.settings(
name := "Manager",
buildSettings,
watchSources ++= (baseDirectory.value / "public/ui" ** "*").get,
promptTheme := ScalapenosTheme
)
lazy val common = (project in file("common"))
.settings(
name := "common",
buildSettings,
promptTheme := ScalapenosTheme,
libraryDependencies ++= commonDependencies
)
lazy val admin = (project in file("admin"))
.dependsOn(common)
.settings(
name := "admin",
buildSettings,
promptTheme := ScalapenosTheme,
libraryDependencies += sprayRoutingShapeless,
libraryDependencies += sprayCan,
libraryDependencies += sprayClient,
libraryDependencies += akkaLog,
libraryDependencies += spec2
)
resolvers ++= Seq(
("spray repo" at "http://repo.spray.io").withAllowInsecureProtocol(true),
("scalaz-bintray" at "http://dl.bintray.com/scalaz/releases").withAllowInsecureProtocol(true),
"Typesafe repository snapshots" at "https://repo.typesafe.com/typesafe/snapshots/",
"Typesafe repository releases" at "https://repo.typesafe.com/typesafe/releases/",
"Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/",
"Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
("Sonatype staging" at "http://oss.sonatype.org/content/repositories/staging")
.withAllowInsecureProtocol(true),
("Java.net Maven2 Repository" at "http://download.java.net/maven/2/")
.withAllowInsecureProtocol(true),
("geomajas repo" at "http://maven.geomajas.org").withAllowInsecureProtocol(true)
)
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3")
Test / scalacOptions ++= Seq("-Yrangepos")
assembly / test := {}
Revolver.settings: Seq[sbt.Def.Setting[_]]
assembly / assemblyMergeStrategy := {
case PathList(ps @ _*) if ps.last endsWith "io.netty.versions.properties" => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}