-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
78 lines (63 loc) · 3.4 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
organization := "woshilaiceshide"
name := "s-server"
version := "3.2-SNAPSHOT"
description := "Some Small Servers written in Scala, including a nio server and a small httpd, which also supports websocket(v13 only)."
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
publishMavenStyle := true
pomIncludeRepository := {_ => false}
enablePlugins(BintrayPlugin)
bintrayRepository := "maven"
bintrayOrganization := Some("woshilaiceshide")
bintrayVcsUrl := Some(s"[email protected]:woshilaiceshide/${name.value}.git")
bintrayReleaseOnPublish in ThisBuild := false
transitiveClassifiers := Seq("sources")
retrieveManaged := false
scalaVersion := "2.12.12"
compileOrder in Compile := CompileOrder.Mixed
scalacOptions := Seq("-unchecked", "-deprecation", "-opt:l:inline", "-opt-inline-from:**", "-encoding", "utf8", "-Yno-adapted-args", "-target:jvm-1.8")
javacOptions ++= Seq("-Xlint:deprecation", "-Xlint:unchecked", "-source", "1.8", "-target", "1.8", "-g:vars")
enablePlugins(JavaAppPackaging)
unmanagedSourceDirectories in Compile += baseDirectory( _ / "src" / "scala" ).value
unmanagedSourceDirectories in Compile += baseDirectory( _ / "spray" / "scala" ).value
//libraryDependencies ++=
// Seq(
// //"io.spray" %% "spray-routing" % "1.3.3",
// //"io.spray" %% "spray-caching" % "1.3.3",
// "io.spray" %% "spray-can" % "1.3.3",
// //"io.spray" %% "spray-client" % "1.3.3",
// "io.spray" %% "spray-http" % "1.3.3",
// //"io.spray" %% "spray-httpx" % "1.3.3",
// //"io.spray" %% "spray-io" % "1.3.3",
// //"io.spray" %% "spray-testkit" % "1.3.3",
// //"io.spray" %% "spray-util" % "1.3.3"
// )
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4.17"
libraryDependencies += "org.parboiled" %% "parboiled-scala" % "1.3.1"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.30"
javaOptions in Universal += "-J-XX:-RestrictContended"
javaOptions in Universal += "-J-Xmx1024m"
javaOptions in Universal += "-J-Xms1024m"
javaOptions in Universal += "-Dproperty1=value1"
javaOptions in Universal += "-property2=value2"
javaOptions in Universal += s"-version=${version.value}"
//enable jit log
//use jitwatch to inspect jit
//see https://github.com/AdoptOpenJDK/jitwatch/releases
javaOptions in Universal += "-J-XX:+UnlockDiagnosticVMOptions"
javaOptions in Universal += "-J-XX:+PrintCompilation"
javaOptions in Universal += "-J-XX:+PrintInlining"
javaOptions in Universal += "-J-XX:+PrintCodeCache"
javaOptions in Universal += "-J-XX:+PrintCodeCacheOnCompilation"
javaOptions in Universal += "-J-XX:+TraceClassLoading"
javaOptions in Universal += "-J-XX:+LogCompilation"
javaOptions in Universal += "-J-XX:LogFile=./jvm.log"
//use jol to inspect object layout schemes.
//see 'http://openjdk.java.net/projects/code-tools/jol/'
//val jol = settingKey[scala.collection.Seq[sbt.ModuleID]]("jol libraries")
//jol := Seq("org.openjdk.jol" % "jol-core" % "0.14", "org.openjdk.jol" % "jol-cli" % "0.14")
//libraryDependencies ++= jol.value
//mainClass in Compile := Some("org.openjdk.jol.Main")
mappings in Universal ++= (baseDirectory.value / "conf" * "*" get) map (x => x -> ("conf/" + x.getName))
//or woshilaiceshide.sserver.EchoHttpServer
mainClass in (Test, run) := Some("woshilaiceshide.sserver.test.SampleHttpServer")