Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
152 lines (136 loc) · 5.2 KB
/
Copy pathbuild.sbt
File metadata and controls
152 lines (136 loc) · 5.2 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import build.BuildImplementation.BuildDefaults
// Tell bloop to aggregate source deps (benchmark) config files in the same bloop config dir
bloopAggregateSourceDependencies in Global := true
/***************************************************************************************************/
/* This is the build definition of the source deps */
/***************************************************************************************************/
val benchmarkBridge = project
.in(file(".benchmark-bridge-compilation"))
.aggregate(BenchmarkBridgeCompilation)
.settings(
releaseEarly := { () },
skip in publish := true
)
/***************************************************************************************************/
/* This is the build definition of the wrapper */
/***************************************************************************************************/
import build.Dependencies
val backend = project
.settings(testSettings)
.settings(
name := "bloop-backend",
libraryDependencies ++= List(
Dependencies.zinc,
Dependencies.nailgun,
Dependencies.coursier,
Dependencies.coursierCache,
Dependencies.libraryManagement,
Dependencies.configDirectories,
Dependencies.caseApp,
Dependencies.sourcecode,
Dependencies.sbtTestInterface,
Dependencies.sbtTestAgent,
Dependencies.monix,
Dependencies.directoryWatcher
)
)
import build.BuildImplementation.jvmOptions
// For the moment, the dependency is fixed
val frontend = project
.dependsOn(backend, backend % "test->test")
.enablePlugins(BuildInfoPlugin)
.settings(testSettings, assemblySettings, releaseSettings, integrationTestSettings)
.settings(
name := s"bloop-frontend",
mainClass in Compile in run := Some("bloop.Cli"),
buildInfoPackage := "bloop.internal.build",
buildInfoKeys := BloopInfoKeys,
javaOptions in run ++= jvmOptions,
javaOptions in Test ++= jvmOptions,
libraryDependencies += Dependencies.graphviz % Test,
fork in run := true,
fork in Test := true,
parallelExecution in test := false,
libraryDependencies ++= List(
Dependencies.bsp,
Dependencies.monix,
Dependencies.ipcsocket % Test
)
)
val benchmarks = project
.dependsOn(frontend % "compile->test", BenchmarkBridgeCompilation % "compile->jmh")
.enablePlugins(BuildInfoPlugin, JmhPlugin)
.settings(benchmarksSettings(frontend))
.settings(
skip in publish := true,
)
lazy val integrationsCore = project
.in(file("integrations") / "core")
.settings(
name := "bloop-integrations-core",
crossScalaVersions := List("2.12.4", "2.10.7"),
// We compile in both so that the maven integration can be tested locally
publishLocal := publishLocal.dependsOn(publishM2).value
)
lazy val sbtBloop = project
.in(file("integrations") / "sbt-bloop")
.dependsOn(integrationsCore)
.settings(
name := "sbt-bloop",
sbtPlugin := true,
scalaVersion := BuildDefaults.fixScalaVersionForSbtPlugin.value,
bintrayPackage := "sbt-bloop",
bintrayOrganization := Some("sbt"),
bintrayRepository := "sbt-plugin-releases",
publishMavenStyle := releaseEarlyWith.value == SonatypePublisher
)
val mavenBloop = project
.in(file("integrations") / "maven-bloop")
.dependsOn(integrationsCore)
.settings(name := "maven-bloop")
.settings(BuildDefaults.mavenPluginBuildSettings)
val docs = project
.in(file("website"))
.enablePlugins(HugoPlugin, GhpagesPlugin)
.settings(
name := "bloop-website",
skip in publish := true,
websiteSettings
)
val allProjects = Seq(backend, benchmarks, frontend, integrationsCore, sbtBloop, mavenBloop)
val allProjectReferences = allProjects.map(p => LocalProject(p.id))
val bloop = project
.in(file("."))
.aggregate(allProjectReferences: _*)
.settings(
releaseEarly := { () },
skip in publish := true,
crossSbtVersions := Seq("1.1.0", "0.13.16")
)
/***************************************************************************************************/
/* This is the corner for all the command definitions */
/***************************************************************************************************/
val publishLocalCmd = Keys.publishLocal.key.label
// Runs the scripted tests to setup integration tests
// ! This is used by the benchmarks too !
addCommandAlias(
"install",
Seq(
s"+${integrationsCore.id}/$publishLocalCmd",
s"^${sbtBloop.id}/$publishLocalCmd",
s"${mavenBloop.id}/$publishLocalCmd",
s"${backend.id}/$publishLocalCmd",
s"${frontend.id}/$publishLocalCmd"
).mkString(";", ";", "")
)
val releaseEarlyCmd = releaseEarly.key.label
val allBloopReleases = List(
s"${backend.id}/$releaseEarlyCmd",
s"${frontend.id}/$releaseEarlyCmd",
s"+${integrationsCore.id}/$publishLocalCmd", // Necessary because of a coursier bug?
s"+${integrationsCore.id}/$releaseEarlyCmd",
s"^${sbtBloop.id}/$releaseEarlyCmd",
s"${mavenBloop.id}/$releaseEarlyCmd",
)
val allReleaseActions = allBloopReleases ++ List("sonatypeReleaseAll")
addCommandAlias("releaseBloop", allReleaseActions.mkString(";", ";", ""))