-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
128 lines (108 loc) · 3.79 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
124
125
126
127
128
import Settings.*
// GLOBAL SETTINGS
name := "sBots"
organization := "com.benkio"
enablePlugins(FlywayPlugin)
Global / onChangedBuildSource := ReloadOnSourceChanges
// SCoverage
coverageEnabled := true
coverageFailOnMinimum := true
coverageMinimumStmtTotal := 86 // TODO: INCREASE THIS
// TASKS
lazy val runMigrate = taskKey[Unit]("Migrates the database schema.")
// COMMAND ALIASES
addCommandAlias("dbSetup", "runMigrate")
addCommandAlias("fix", ";scalafixAll; scalafmtAll; scalafmtSbt")
addCommandAlias("check", "undeclaredCompileDependenciesTest; scalafmtSbtCheck; scalafmtCheck; Test/scalafmtCheck")
addCommandAlias("generateTriggerTxt", "main/runMain com.benkio.main.GenerateTriggers")
addCommandAlias(
"validate",
";clean; compile; fix; generateTriggerTxt; coverage; test; integration/runIntegrationMUnitTests; coverageAggregate"
)
addCommandAlias("checkAllLinksTest", "integration/runIntegrationScalaTests")
// PROJECTS
lazy val sBots =
Project("sBots", file("."))
.settings(Settings.settings *)
.aggregate(
main,
botDB,
telegramBotInfrastructure,
calandroBot,
aBarberoBot,
richardPHJBensonBot,
xahLeeBot,
youTuboAncheI0Bot,
m0sconiBot
)
lazy val telegramBotInfrastructure =
Project("telegramBotInfrastructure", file("telegramBotInfrastructure"))
.settings(Settings.settings *)
.settings(Settings.TelegramBotInfrastructureSettings *)
.disablePlugins(AssemblyPlugin)
lazy val calandroBot =
Project("calandroBot", file("calandroBot"))
.settings(Settings.settings *)
.settings(Settings.CalandroBotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val aBarberoBot =
Project("aBarberoBot", file("aBarberoBot"))
.settings(Settings.settings *)
.settings(Settings.ABarberoBotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val richardPHJBensonBot =
Project("richardPHJBensonBot", file("richardPHJBensonBot"))
.settings(Settings.settings *)
.settings(Settings.RichardPHJBensonBotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val xahLeeBot =
Project("xahLeeBot", file("xahLeeBot"))
.settings(Settings.settings *)
.settings(Settings.XahLeeBotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val youTuboAncheI0Bot =
Project("youTuboAncheI0Bot", file("youTuboAncheI0Bot"))
.settings(Settings.settings *)
.settings(Settings.YouTuboAncheI0BotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val m0sconiBot =
Project("m0sconiBot", file("m0sconiBot"))
.settings(Settings.settings *)
.settings(Settings.M0sconiBotSettings *)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val main = project
.in(file("main"))
.settings(Settings.settings *)
.settings(Settings.MainSettings)
.dependsOn(
calandroBot,
aBarberoBot,
richardPHJBensonBot,
xahLeeBot,
youTuboAncheI0Bot,
m0sconiBot,
telegramBotInfrastructure % "compile->compile;test->test"
)
lazy val botDB =
Project("botDB", file("botDB"))
.settings(Settings.settings *)
.settings(Settings.BotDBSettings)
.settings(
fullRunTask(runMigrate, Compile, "com.benkio.botDB.Main"),
runMigrate / fork := true
)
.dependsOn(telegramBotInfrastructure % "compile->compile;test->test")
lazy val integration = (project in file("integration"))
.dependsOn(
telegramBotInfrastructure % "compile->compile;test->test",
calandroBot,
aBarberoBot,
richardPHJBensonBot,
xahLeeBot,
youTuboAncheI0Bot,
m0sconiBot,
botDB % "compile->compile;test->test",
main
)
.settings(Settings.settings *)
.settings(Settings.IntegrationSettings)