forked from docspell/swiss-qr-addon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
123 lines (114 loc) · 3.13 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
120
121
122
123
import com.github.sbt.git.SbtGit.GitKeys._
val sharedSettings = Seq(
organization := "org.docspell.addon.swissqr",
scalaVersion := Dependencies.V.scala,
startYear := Some(2022),
licenses += ("GPL-3.0-or-later", url(
"https://spdx.org/licenses/GPL-3.0-or-later.html"
)),
javacOptions ++= Seq("-target", "1.8", "-source", "1.8"),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-encoding",
"UTF-8",
"-language:higherKinds",
"-explain",
"-explain-types",
"-indent",
"-print-lines",
"-Ykind-projector",
"-Xmigration",
"-Xfatal-warnings"
)
)
val buildInfoSettings = Seq(
buildInfoKeys := Seq[BuildInfoKey](
name,
version,
scalaVersion,
sbtVersion,
gitHeadCommit,
gitHeadCommitDate,
gitUncommittedChanges,
gitDescribedVersion
),
buildInfoOptions += BuildInfoOption.ToJson,
buildInfoOptions += BuildInfoOption.BuildTime
)
// -- modules
val core = project
.in(file("modules/core"))
.withTestSettings
.settings(sharedSettings)
.settings(
name := "docspell-swissqr-core",
libraryDependencies ++=
Dependencies.cats ++
Dependencies.boofcv ++
Dependencies.pdfbox ++
Dependencies.circe ++
Dependencies.fs2 ++
Dependencies.fs2Io
)
val cli = project
.in(file("modules/cli"))
.withTestSettings
.settings(sharedSettings)
.settings(
name := "docspell-swissqr-cli",
libraryDependencies ++=
Dependencies.decline,
assembly / mainClass := Some("docspell.swissqr.cli.Main"),
assembly / assemblyPrependShellScript := Some(
AssemblyPlugin.defaultUniversalScript()
),
assembly / assemblyJarName := "swissqr-cli.jar"
)
.dependsOn(core)
val addon = project
.in(file("modules/addon"))
.enablePlugins(DocspellAddonPlugin)
.withTestSettings
.settings(sharedSettings)
.settings(
name := "swissqr-addon",
libraryDependencies ++=
Dependencies.circeYaml ++
Dependencies.circeParser,
assembly / mainClass := Some("docspell.swissqr.addon.Main"),
assembly / assemblyPrependShellScript := Some(
AssemblyPlugin.defaultUniversalScript()
),
assembly / assemblyJarName := "swissqr-addon.jar",
addonMetaDescription :=
"""
|Detect Swiss QR-Bill QR codes in files and amend the
|item with this information.
|
|It must be run in the context of an item, allowing triggers: `final-process-item`,
|`final-reprocess-item` and `existing-item`.
|
|Please see [the README](https://github.com/docspell/swiss-qr-addon) for
|how to configure it. It works without a config as well.""".stripMargin,
addonTriggers := List(
"existing-item",
"final-process-item",
"final-reprocess-item"
),
addonDockerEnable := true,
addonNetworking := false,
addonCollectOutput := true
)
.dependsOn(core, cli)
// -- root
val root = project
.in(file("."))
.settings(sharedSettings)
.settings(
name := "docspell-swissqr"
)
.aggregate(core, cli, addon)
addCommandAlias("ci", "test; addon/addonPackage")
addCommandAlias("make-pkg", "addon/addonPackage")