-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sbt
74 lines (62 loc) · 1.94 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
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / version := "0.0.1"
ThisBuild / organization := "dev.tradex"
ThisBuild / organizationName := "tradex"
ThisBuild / evictionErrorLevel := Level.Warn
ThisBuild / scalafixDependencies += Dependencies.organizeImports
ThisBuild / fork in run := true
resolvers += Resolver.sonatypeRepo("snapshots")
val scalafixCommonSettings = inConfig(IntegrationTest)(scalafixConfigSettings(IntegrationTest))
lazy val root = (project in file("."))
.settings(
name := "tradeio"
)
.aggregate(core, tests)
lazy val core = (project in file("modules/core")).settings(
name := "tradeio-core",
commonSettings,
consoleSettings,
dependencies
)
lazy val tests = (project in file("modules/tests"))
.configs(IntegrationTest)
.settings(
name := "tradeio-test-suite",
commonSettings,
testFrameworks += new TestFramework("weaver.framework.CatsEffect"),
Defaults.itSettings,
scalafixCommonSettings,
testDependencies
)
.dependsOn(core)
lazy val commonSettings = Seq(
scalafmtOnCompile := true,
scalacOptions ++= List("-Ymacro-annotations", "-Yrangepos", "-Wconf:cat=unused:info"),
resolvers += Resolver.sonatypeRepo("snapshots")
)
lazy val consoleSettings = Seq(
Compile / console / scalacOptions --= Seq("-Ywarn-unused", "-Ywarn-unused-import")
)
lazy val compilerOptions = {
val commonOptions = Seq(
"-unchecked",
"-deprecation",
"-encoding",
"utf8",
"-target:jvm-1.8",
"-feature",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps",
"-Ywarn-value-discard",
"-Ymacro-annotations",
"-Ywarn-unused:imports"
)
scalacOptions ++= commonOptions
}
lazy val dependencies =
libraryDependencies ++= Dependencies.tradeioDependencies
lazy val testDependencies =
libraryDependencies ++= Dependencies.testDependencies
addCommandAlias("runLinter", ";scalafixAll --rules OrganizeImports")