-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
54 lines (38 loc) · 2.05 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
name := "Obsidian"
version := "0.1"
scalaVersion := "2.13.5"
organization := "edu.cmu.cs.obsidian"
// mustache java
// https://mvnrepository.com/artifact/com.github.spullara.mustache.java/mustache.java
libraryDependencies += "com.github.spullara.mustache.java" % "compiler" % "0.9.6"
// For dependencies of fabric-chaincode.
resolvers += "Jitpack" at "https://www.jitpack.io"
resolvers += Resolver.jcenterRepo
scalacOptions := Seq("-unchecked", "-deprecation")
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
assembly / assemblyJarName := "obsidianc.jar"
Compile / unmanagedResourceDirectories += baseDirectory.value / "Obsidian_Runtime/src/main/java/Runtime/edu/cmu/cs/obsidian"
Compile / unmanagedResources / includeFilter := "*.obs"
/* Don't throw TrapExitSecurityException.
* Also, allow passing return code through SBT without
* SBT throwing an exception. */
trapExit := false
/* testing dependencies */
libraryDependencies += "junit" % "junit" % "4.12" % "test"
libraryDependencies += "org.scalactic" %% "scalactic" % "3.1.2" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.2" % "test"
libraryDependencies += "org.scalatestplus" %% "scalatestplus-junit" % "1.0.0-M2"
libraryDependencies += "com.google.protobuf" % "protobuf-java" % "3.11.4"
libraryDependencies += "org.hyperledger.fabric-chaincode-java" % "fabric-chaincode-shim" % "1.4.4"
libraryDependencies += "com.helger" % "jcodemodel" % "3.3.0"
libraryDependencies += "org.apache.commons" % "commons-io" % "1.3.2"
/* settings for assembly */
// don't get confused about multiple META-INF/MANIFEST.MF
assembly / assemblyMergeStrategy := {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case x if x.contains("module-info.class") => MergeStrategy.discard // https://stackoverflow.com/questions/54834125/sbt-assembly-deduplicate-module-info-class
case x if x.contains("io.netty.versions.properties") => MergeStrategy.discard
case x =>
val oldStrategy = ( assembly / assemblyMergeStrategy).value
oldStrategy(x)
}