forked from ckaestne/vbc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
119 lines (97 loc) · 4.25 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
import com.typesafe.sbt.packager.docker.DockerChmodType.UserGroupWriteExecute
import com.typesafe.sbt.packager.docker.DockerPermissionStrategy
scalaVersion := "2.13.1"
libraryDependencies += "org.ow2.asm" % "asm" % "8.0.1"
libraryDependencies += "org.ow2.asm" % "asm-tree" % "8.0.1"
libraryDependencies += "org.ow2.asm" % "asm-util" % "8.0.1"
libraryDependencies += "org.scalactic" %% "scalactic" % "3.1.1"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.1" % "test"
libraryDependencies += "com.vladsch.flexmark" % "flexmark-all" % "0.35.10" % "test"
resolvers += "Sonatype OSS Snapshots" at
"https://oss.sonatype.org/content/repositories/releases"
libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.19" % "test"
libraryDependencies += "com.google.code.findbugs" % "jsr305" % "3.0.1"
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.2.0"
libraryDependencies += "org.mongodb" % "mongodb-driver-sync" % "4.0.2"
libraryDependencies += "org.apache.commons" % "commons-compress" % "1.20"
libraryDependencies += "com.amazonaws" % "aws-java-sdk-sqs" % "1.11.765"
libraryDependencies += "commons-io" % "commons-io" % "2.8.0"
parallelExecution in Test := false
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
scalacOptions += "-unchecked"
initialize := {
val _ = initialize.value
if (sys.props("java.specification.version") != "1.8")
sys.error("Java 8 is required for this project.")
}
testOptions in Test ++= Seq(
Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/html")
)
// checkstyle dependencies
libraryDependencies += "commons-cli" % "commons-cli" % "1.2"
libraryDependencies += "com.google.guava" % "guava" % "18.0"
libraryDependencies += "commons-beanutils" % "commons-beanutils" % "1.8.3"
//libraryDependencies += "antlr" % "antlr" % "2.7.7"
libraryDependencies += "org.antlr" % "antlr4-runtime" % "4.3"
libraryDependencies += "org.apache.ant" % "ant" % "1.7.0"
// config
libraryDependencies += "com.typesafe" % "config" % "1.4.0"
unmanagedJars in Compile ~= {uj =>
Seq(Attributed.blank(file(System.getProperty("java.home").dropRight(3) + "lib/tools.jar"))) ++ uj
}
// for benchmarking
fork := true
(fullClasspath in Runtime) := (fullClasspath in Runtime).value ++ (fullClasspath in Test).value
// assembly
test in assembly := {}
assemblyMergeStrategy in assembly := {
case PathList("org", "objectweb", "asm", xs@_*) => MergeStrategy.first
case PathList("org", "apache", "log4j", xs@_*) => MergeStrategy.first
case x =>
val default = (assemblyMergeStrategy in assembly).value
default(x)
}
// docker
enablePlugins(DockerPlugin, JavaAppPackaging)
dockerBaseImage := "chupanw/openjdk8"
dockerPermissionStrategy := DockerPermissionStrategy.Run
dockerChmodType := UserGroupWriteExecute
dockerExposedPorts ++= Seq(9000)
dockerUpdateLatest := true
dockerRepository := Some("chupanw")
defaultLinuxInstallLocation in Docker := "/home/" + (daemonUser in Docker).value + "/docker"
// VarexC:
//dockerEntrypoint := Seq(
// "timeout", "-k", "60", "6h",
// "/home/" + (daemonUser in Docker).value + "/docker/bin/closure-cloud-patch-runner",
// "-J-Xmx16g",
// "-J-Xss10m",
// "-Dvarexc.fastMode=true",
// "-Dvarexc.earlyFail=true",
// "-Dvarexc.maxInteractionDegree=3",
// "-Dvarexc.enableStackTraceCheck=true",
// "-Dvarexc.blockCount.enablePerTestBlockCount=true",
// "-Dvarexc.blockCount.maxBlockCount=-1",
// "-Dvarexc.maxStackDepth=600",
//)
//dockerEntrypoint := Seq(
// "timeout", "-k", "60", "3h",
// "/home/" + (daemonUser in Docker).value + "/docker/bin/intro-class-cloud-patch-runner",
// "-J-Xmx16g",
// "-J-Xss10m",
// "-Dvarexc.fastMode=true",
// "-Dvarexc.earlyFail=true",
// "-Dvarexc.maxInteractionDegree=3",
// "-Dvarexc.enableStackTraceCheck=true",
// "-Dvarexc.blockCount.enablePerTestBlockCount=true",
// "-Dvarexc.blockCount.maxBlockCount=-1",
// "-Dvarexc.maxStackDepth=600",
//)
// GenProg:
dockerEntrypoint := Seq(
// "timeout", "-k", "60", "3h", // should terminate before this limit, leaving some time to upload files
"/home/" + (daemonUser in Docker).value + "/docker/bin/intro-class-gen-prog-cloud-patch-runner",
"-J-Xmx16g"
)