-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
67 lines (54 loc) · 2.74 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
import sbt.Keys.publishMavenStyle
enablePlugins(GraalVMNativeImagePlugin)
lazy val sonatypePublic = "Sonatype Public" at "https://oss.sonatype.org/content/groups/public/"
lazy val sonatypeReleases = "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/"
lazy val sonatypeSnapshots = "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
resolvers ++= Seq(Resolver.mavenLocal, sonatypeReleases, sonatypeSnapshots, Resolver.mavenCentral)
scalaVersion := "2.12.10"
version := "3.1.1"
val appkit = "org.ergoplatform" %% "ergo-appkit" % "3.2.1"
val mockitoScalaVerstion = "1.11.4"
libraryDependencies ++= Seq(
appkit, (appkit % Test).classifier("tests"),
//.classifier("tests-sources") // uncomment this for debuging to make sources available (doesn't work when appkit is published locally) ,
"org.graalvm.sdk" % "graal-sdk" % "19.2.1",
"com.squareup.okhttp3" % "mockwebserver" % "3.12.0",
"org.ergoplatform" %% "verified-contracts" % "0.0.0-5-ee53f015-SNAPSHOT",
"org.scalatest" %% "scalatest" % "3.0.8" % "test",
"org.scalacheck" %% "scalacheck" % "1.14.1" % "test",
"org.mockito" %% "mockito-scala" % mockitoScalaVerstion % "test",
"org.mockito" %% "mockito-scala-scalatest" % mockitoScalaVerstion % "test"
)
publishMavenStyle in ThisBuild := true
publishArtifact in Test := false
fork in Test := false
pomExtra in ThisBuild :=
<developers>
<developer>
<id>aslesarenko</id>
<name>Alexander Slesarenko</name>
<url>https://github.com/aslesarenko/</url>
</developer>
</developers>
// set bytecode version to 8 to fix NoSuchMethodError for various ByteBuffer methods
// see https://github.com/eclipse/jetty.project/issues/3244
// these options applied only in "compile" task since scalac crashes on scaladoc compilation with "-release 8"
// see https://github.com/scala/community-builds/issues/796#issuecomment-423395500
scalacOptions in(Compile, compile) ++= (if (scalaBinaryVersion.value == "2.11") Seq() else Seq("-release", "8"))
test in assembly := {}
assemblyJarName in assembly := s"ergotool-${version.value}.jar"
// See https://www.scala-sbt.org/sbt-native-packager/formats/graalvm-native-image.html
graalVMNativeImageOptions ++= Seq(
"-H:ResourceConfigurationFiles=" + baseDirectory.value / "graal" / "META-INF" / "native-image" / "resource-config.json",
"-H:ReflectionConfigurationFiles=" + baseDirectory.value / "graal" / "META-INF" / "native-image" / "reflect-config.json",
"--no-server",
"--report-unsupported-elements-at-runtime",
"--no-fallback",
"-H:+TraceClassInitialization",
"-H:+ReportExceptionStackTraces",
"-H:+AddAllCharsets",
"-H:+AllowVMInspection",
"-H:-RuntimeAssertions",
"--allow-incomplete-classpath",
"--enable-url-protocols=http,https"
)