-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
134 lines (118 loc) · 5.42 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
129
130
131
132
133
134
import sbt._
lazy val allModules = Seq[ProjectReference](
sharedExternalAdapter,
sharedInternalAdapter,
sharedStreamAdapter,
sharedSecondaryAdapter,
sharedLib,
exampleApiExternalAdapter,
exampleApiInternalAdapter,
exampleApiSecondaryAdapter,
exampleApiUseCase,
exampleApiDomain
)
/** ***********************************************
* root - 分離前&統合test用PJ
* ***********************************************/
lazy val root = (project in file("."))
.configs(Common.Settings.TestSeq: _*)
.settings(Common.Settings.commonSettings: _*)
.settings(Common.Settings.commonTestSettings: _*)
.settings(RootProject.Settings.rootSettings: _*)
.aggregate(
allModules: _*
)
.dependsOn(
allModules.map(_ % "test->test;compile->compile;test->compile"): _*
)
.enablePlugins(GitVersioning, JavaServerAppPackaging, ScalafmtPlugin)
/** ***********************************************
* shared - 共通コード
* ***********************************************/
lazy val sharedExternalAdapter = (project in file("modules/shared/external-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(SharedProject.Settings.externalAdapterPjSettings: _*)
.settings(libraryDependencies ++= SharedProject.Dependencies.ExternalAdapterPj.Deps)
.dependsOn(
sharedSecondaryAdapter % "test->test;compile->compile;test->compile",
sharedLib % "test->test;compile->compile;test->compile"
)
lazy val sharedInternalAdapter = (project in file("modules/shared/internal-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(SharedProject.Settings.internalAdapterPjSettings: _*)
.settings(libraryDependencies ++= SharedProject.Dependencies.InternalAdapterPj.Deps)
.dependsOn(
sharedSecondaryAdapter % "test->test;compile->compile;test->compile",
sharedLib % "test->test;compile->compile;test->compile"
)
lazy val sharedStreamAdapter = (project in file("modules/shared/stream-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(SharedProject.Settings.streamAdapterPjSettings: _*)
.settings(libraryDependencies ++= SharedProject.Dependencies.StreamAdapterPj.Deps)
.dependsOn(
sharedSecondaryAdapter % "test->test;compile->compile;test->compile",
sharedLib % "test->test;compile->compile;test->compile"
)
lazy val sharedSecondaryAdapter = (project in file("modules/shared/secondary-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(SharedProject.Settings.secondaryAdapterPjSettings: _*)
.settings(libraryDependencies ++= SharedProject.Dependencies.SecondaryAdapterPj.Deps)
.dependsOn(
sharedLib % "test->test;compile->compile;test->compile"
)
lazy val sharedLib = (project in file("modules/shared/lib"))
.configs(Common.Settings.TestSeq: _*)
.settings(SharedProject.Settings.libPjSettings: _*)
.settings(libraryDependencies ++= SharedProject.Dependencies.LibPj.Deps)
.dependsOn()
/** ***********************************************
* exampleApi
* ***********************************************/
lazy val exampleApiExternalAdapter = (project in file("modules/example-api/external-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(ExampleApiProject.Settings.externalAdapterPjSettings: _*)
.settings(libraryDependencies ++= ExampleApiProject.Dependencies.externalAdapterPjDeps)
.dependsOn(
sharedExternalAdapter % "test->test;compile->compile;test->compile",
exampleApiSecondaryAdapter % "test->test;compile->compile;test->compile"
)
lazy val exampleApiInternalAdapter = (project in file("modules/example-api/internal-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(ExampleApiProject.Settings.internalAdapterPjSettings: _*)
.settings(libraryDependencies ++= ExampleApiProject.Dependencies.internalAdapterPjDeps)
.dependsOn(
sharedInternalAdapter % "test->test;compile->compile;test->compile",
exampleApiSecondaryAdapter % "test->test;compile->compile;test->compile"
)
lazy val exampleApiSecondaryAdapter = (project in file("modules/example-api/secondary-adapter"))
.configs(Common.Settings.TestSeq: _*)
.settings(ExampleApiProject.Settings.secondaryAdapterPjSettings: _*)
.settings(libraryDependencies ++= ExampleApiProject.Dependencies.secondaryAdapterPjDeps)
.dependsOn(
sharedSecondaryAdapter % "test->test;compile->compile;test->compile",
exampleApiUseCase % "test->test;compile->compile;test->compile"
)
lazy val exampleApiUseCase = (project in file("modules/example-api/usecase"))
.configs(Common.Settings.TestSeq: _*)
.settings(ExampleApiProject.Settings.useCasePjSettings: _*)
.settings(libraryDependencies ++= ExampleApiProject.Dependencies.useCasePjDeps)
.dependsOn(
exampleApiDomain % "test->test;compile->compile;test->compile"
)
lazy val exampleApiDomain = (project in file("modules/example-api/domain"))
.configs(Common.Settings.TestSeq: _*)
.settings(ExampleApiProject.Settings.domainPjSettings: _*)
.settings(libraryDependencies ++= ExampleApiProject.Dependencies.domainPjDeps)
.dependsOn(
sharedLib % "test->test;compile->compile;test->compile"
)
/** ***********************************************
* Other
* ***********************************************/
fork in Test := false
cancelable in Global := true
testOptions in Test += Tests.Argument("-oT")
// disable publishing the main API jar
publishArtifact in (Compile, packageDoc) := false
// disable publishing the main sources jar
publishArtifact in (Compile, packageSrc) := false