Skip to content

Commit 40d405b

Browse files
authored
Merge pull request #2302 from dotty-staging/add/dotty-doc-bootstrapped
Add missing dotty-doc-bootstrapped project
2 parents 7c9b807 + 58910be commit 40d405b

File tree

2 files changed

+61
-50
lines changed

2 files changed

+61
-50
lines changed

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ val dotty = Build.dotty
22
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
33
val `dotty-interfaces` = Build.`dotty-interfaces`
44
val `dotty-doc` = Build.`dotty-doc`
5+
val `dotty-doc-bootstrapped` = Build.`dotty-doc-bootstrapped`
56
val `dotty-bot` = Build.`dotty-bot`
67
val `dotty-compiler` = Build.`dotty-compiler`
78
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`

project/Build.scala

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ object Build {
135135

136136
// Meta project aggregating all bootstrapped projects
137137
lazy val `dotty-bootstrapped` = project.
138-
aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`).
138+
aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`, `dotty-doc-bootstrapped`).
139139
settings(
140140
publishArtifact := false
141141
)
@@ -152,63 +152,73 @@ object Build {
152152
).
153153
settings(publishing)
154154

155-
lazy val `dotty-doc` = project.in(file("doc-tool")).
156-
dependsOn(`dotty-compiler`, `dotty-compiler` % "test->test").
157-
settings(sourceStructure).
158-
settings(
159-
baseDirectory in (Compile, run) := baseDirectory.value / "..",
160-
baseDirectory in (Test, run) := baseDirectory.value,
161-
162-
connectInput in run := true,
163-
outputStrategy := Some(StdoutOutput),
164-
165-
javaOptions ++= (javaOptions in `dotty-compiler`).value,
166-
fork in run := true,
167-
fork in Test := true,
168-
parallelExecution in Test := false,
169-
170-
genDocs := Def.inputTaskDyn {
171-
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
172-
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
173-
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
174-
val sources =
175-
(unmanagedSources in (Compile, compile)).value ++
155+
// Settings shared between dotty-doc and dotty-doc-bootstrapped
156+
lazy val dottyDocSettings = Seq(
157+
baseDirectory in (Compile, run) := baseDirectory.value / "..",
158+
baseDirectory in (Test, run) := baseDirectory.value,
159+
160+
connectInput in run := true,
161+
outputStrategy := Some(StdoutOutput),
162+
163+
javaOptions ++= (javaOptions in `dotty-compiler`).value,
164+
fork in run := true,
165+
fork in Test := true,
166+
parallelExecution in Test := false,
167+
168+
genDocs := Def.inputTaskDyn {
169+
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
170+
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
171+
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
172+
val sources =
173+
(unmanagedSources in (Compile, compile)).value ++
176174
(unmanagedSources in (`dotty-compiler`, Compile)).value
177-
val args: Seq[String] = Seq(
178-
"-siteroot", "docs",
179-
"-project", "Dotty",
180-
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
181-
)
175+
val args: Seq[String] = Seq(
176+
"-siteroot", "docs",
177+
"-project", "Dotty",
178+
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
179+
)
182180
(runMain in Compile).toTask(
183181
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
184182
)
185-
}.evaluated,
186-
187-
dottydoc := Def.inputTaskDyn {
188-
val args: Seq[String] = spaceDelimited("<arg>").parsed
189-
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
190-
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
191-
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
192-
val cp: Seq[String] = Seq("-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps")
183+
}.evaluated,
184+
185+
dottydoc := Def.inputTaskDyn {
186+
val args: Seq[String] = spaceDelimited("<arg>").parsed
187+
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
188+
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
189+
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
190+
val cp: Seq[String] = Seq("-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps")
193191
(runMain in Compile).toTask(s""" dotty.tools.dottydoc.Main ${cp.mkString(" ")} """ + args.mkString(" "))
194-
}.evaluated,
192+
}.evaluated,
193+
194+
libraryDependencies ++= Seq(
195+
"com.novocode" % "junit-interface" % "0.11" % "test",
196+
"com.vladsch.flexmark" % "flexmark" % "0.11.1",
197+
"com.vladsch.flexmark" % "flexmark-ext-gfm-tasklist" % "0.11.1",
198+
"com.vladsch.flexmark" % "flexmark-ext-gfm-tables" % "0.11.1",
199+
"com.vladsch.flexmark" % "flexmark-ext-autolink" % "0.11.1",
200+
"com.vladsch.flexmark" % "flexmark-ext-anchorlink" % "0.11.1",
201+
"com.vladsch.flexmark" % "flexmark-ext-emoji" % "0.11.1",
202+
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % "0.11.1",
203+
"com.vladsch.flexmark" % "flexmark-ext-yaml-front-matter" % "0.11.1",
204+
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.8.6",
205+
"nl.big-o" % "liqp" % "0.6.7"
206+
)
207+
)
195208

196-
libraryDependencies ++= Seq(
197-
"com.novocode" % "junit-interface" % "0.11" % "test",
198-
"com.vladsch.flexmark" % "flexmark" % "0.11.1",
199-
"com.vladsch.flexmark" % "flexmark-ext-gfm-tasklist" % "0.11.1",
200-
"com.vladsch.flexmark" % "flexmark-ext-gfm-tables" % "0.11.1",
201-
"com.vladsch.flexmark" % "flexmark-ext-autolink" % "0.11.1",
202-
"com.vladsch.flexmark" % "flexmark-ext-anchorlink" % "0.11.1",
203-
"com.vladsch.flexmark" % "flexmark-ext-emoji" % "0.11.1",
204-
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % "0.11.1",
205-
"com.vladsch.flexmark" % "flexmark-ext-yaml-front-matter" % "0.11.1",
206-
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.8.6",
207-
"nl.big-o" % "liqp" % "0.6.7"
208-
)
209-
).
209+
lazy val `dotty-doc` = project.in(file("doc-tool")).
210+
dependsOn(`dotty-compiler`, `dotty-compiler` % "test->test").
211+
settings(sourceStructure).
212+
settings(dottyDocSettings).
210213
settings(publishing)
211214

215+
lazy val `dotty-doc-bootstrapped` = project.in(file("doc-tool")).
216+
dependsOn(`dotty-compiler-bootstrapped`, `dotty-compiler-bootstrapped` % "test->test").
217+
settings(sourceStructure).
218+
settings(commonBootstrappedSettings).
219+
settings(dottyDocSettings)
220+
221+
212222
lazy val `dotty-bot` = project.in(file("bot")).
213223
settings(sourceStructure).
214224
settings(

0 commit comments

Comments
 (0)