-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
71 lines (64 loc) · 2.03 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
import sbt.Keys._
lazy val commonSettings = Seq(
organization := "com.nulabinc",
version := "0.17.1-SNAPSHOT",
scalaVersion := "2.13.6",
scalacOptions ++= Seq(
"-language:reflectiveCalls",
"-language:postfixOps",
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-Yrangepos",
"-Ywarn-dead-code",
"-Xlint:unused"
),
resolvers ++= Seq("snapshots", "releases").map(Resolver.sonatypeRepo),
javacOptions ++= Seq("-encoding", "UTF-8"),
// scalafix
addCompilerPlugin(scalafixSemanticdb),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
assembly / assemblyMergeStrategy := {
case x if x.endsWith("module-info.class") => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
)
lazy val common = (project in file("common")).settings(commonSettings: _*)
lazy val redmine =
(project in file("redmine")).settings(commonSettings: _*).dependsOn(common)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(
name := "backlog-migration-redmine",
libraryDependencies ++= Seq(
"org.rogach" %% "scallop" % "4.1.0"
),
assembly / assemblyJarName := {
s"${name.value}-${version.value}.jar"
},
Test / testOptions ++= Seq(
Tests.Argument(TestFrameworks.ScalaTest, "-u", "target/test-reports"),
Tests.Argument(
TestFrameworks.ScalaTest,
"-f",
"target/test-reports/output.txt"
)
),
assembly / test := {}
)
.dependsOn(common % "test->test;compile->compile")
.dependsOn(redmine % "test->test;compile->compile")
addCommandAlias(
"fixAll",
"all compile:scalafix; test:scalafix; scalafmt; test:scalafmt; scalafmtSbt"
)
addCommandAlias(
"checkAll",
"compile:scalafix --check; test:scalafix --check; scalafmtCheck; test:scalafmtCheck; scalafmtSbtCheck"
)
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"
Global / onChangedBuildSource := ReloadOnSourceChanges