-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sbt
69 lines (63 loc) · 2.17 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
lazy val commonSettings = Seq(
organization := "com.nulabinc",
version := "0.7.1-SNAPSHOT",
scalaVersion := "2.13.6",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-Wunused"
),
libraryDependencies ++= {
val spec2Version = "4.8.3"
Seq(
// test
"org.scalatest" %% "scalatest" % "3.1.0" % "test",
"org.specs2" %% "specs2-core" % spec2Version % Test,
"org.specs2" %% "specs2-matcher" % spec2Version % Test,
"org.specs2" %% "specs2-matcher-extra" % spec2Version % Test,
"org.specs2" %% "specs2-mock" % spec2Version % Test
)
},
javacOptions ++= Seq("-encoding", "UTF-8"),
assembly / assemblyMergeStrategy := {
case x if x.endsWith("module-info.class") => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
},
assembly / test := {},
// scalafix
addCompilerPlugin(scalafixSemanticdb),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
lazy val common = (project in file("common")).settings(commonSettings)
lazy val client = (project in file("jira-client")).settings(commonSettings)
lazy val root = (project in file("."))
.settings(commonSettings)
.settings(
name := "backlog-migration-jira",
libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % "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")
)
)
.dependsOn(common % "test->test;compile->compile", client)
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