-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
114 lines (95 loc) · 3.78 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
import com.typesafe.sbt.packager.docker._
ThisBuild / organization := "de.upb.cs.swt.delphi"
ThisBuild / organizationName := "Delphi Project"
ThisBuild / organizationHomepage := Some(url("https://delphi.cs.uni-paderborn.de/"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/delphi-hub/delphi-cli"),
"scm:[email protected]:delphi-hub/delphi-cli.git"
)
)
ThisBuild / developers := List(
Developer(
id = "bhermann",
name = "Ben Hermann",
email = "[email protected]",
url = url("https://www.thewhitespace.de")
)
)
ThisBuild / description := "The command line client for Delphi"
ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / homepage := Some(url("https://delphi.cs.uni-paderborn.de/"))
lazy val scala212 = "2.12.10"
lazy val scala213 = "2.13.1"
lazy val supportedScalaVersions = List(scala213)
ThisBuild / scalaVersion := scala213
name := "delphi"
version := "0.9.5"
maintainer := "Ben Hermann <[email protected]>"
packageSummary := "Windows Package for the Delphi CLI"
packageDescription := """Windows Package for the Delphi CLI"""
wixProductId := "ce07be71-510d-414a-92d4-dff47631848a"
wixProductUpgradeId := "4552fb0e-e257-4dbd-9ecb-dba9dbacf424"
scalastyleConfig := baseDirectory.value / "project" / "scalastyle_config.xml"
val http4sVersion = "0.21.0-M6"
// Only necessary for SNAPSHOT releases
resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-client" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion
)
libraryDependencies += "com.github.scopt" %% "scopt" % "3.7.1"
libraryDependencies += "io.spray" %% "spray-json" % "1.3.5"
libraryDependencies += "de.vandermeer" % "asciitable" % "0.3.2"
libraryDependencies += "com.lihaoyi" %% "fansi" % "0.2.7"
libraryDependencies += "au.com.bytecode" % "opencsv" % "2.4"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0" % "test"
libraryDependencies += "joda-time" % "joda-time" % "2.10.5"
libraryDependencies += "de.upb.cs.swt.delphi" %% "delphi-core" % "0.9.2"
libraryDependencies += "de.upb.cs.swt.delphi" %% "delphi-client" % "0.9.2"
libraryDependencies ++= Seq(
"com.softwaremill.sttp" %% "core" % "1.7.2",
"com.softwaremill.sttp" %% "spray-json" % "1.7.2"
)
debianPackageDependencies := Seq("java8-runtime-headless")
mainClass in Compile := Some("de.upb.cs.swt.delphi.cli.DelphiCLI")
discoveredMainClasses in Compile := Seq()
lazy val cli = (project in file(".")).
enablePlugins(JavaAppPackaging).
enablePlugins(DockerPlugin).
settings(
dockerBaseImage := "openjdk:jre-alpine",
dockerAlias := com.typesafe.sbt.packager.docker.DockerAlias(None, Some("delphihub"),"delphi-cli", Some(version.value)),
dockerEntrypoint := Seq("/bin/bash"),
dockerCommands ++= Seq(
Cmd("USER", "root"),
Cmd("RUN", "apk", "--no-cache", "add", "bash"),
Cmd("RUN", "ln", "-s", "/opt/docker/bin/delphi", "/usr/bin/delphi" ),
Cmd("USER", "daemon")
)
).
enablePlugins(ScalastylePlugin).
enablePlugins(BuildInfoPlugin).
enablePlugins(DebianPlugin).
enablePlugins(WindowsPlugin).
enablePlugins(GraalVMNativeImagePlugin).
settings(
graalVMNativeImageOptions ++= Seq(
"--enable-https",
"--enable-http",
"--enable-all-security-services",
"--allow-incomplete-classpath",
"--enable-url-protocols=http,https"
)
).
enablePlugins(JDKPackagerPlugin).
settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "de.upb.cs.swt.delphi.cli",
crossScalaVersions := supportedScalaVersions
)
scalastyleConfig := baseDirectory.value / "project" / "scalastyle-config.xml"
trapExit := false
fork := true
connectInput := true