Skip to content

Add missing dotty-doc-bootstrapped project #2302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ val dotty = Build.dotty
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
val `dotty-interfaces` = Build.`dotty-interfaces`
val `dotty-doc` = Build.`dotty-doc`
val `dotty-doc-bootstrapped` = Build.`dotty-doc-bootstrapped`
val `dotty-bot` = Build.`dotty-bot`
val `dotty-compiler` = Build.`dotty-compiler`
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`
Expand Down
110 changes: 60 additions & 50 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ object Build {

// Meta project aggregating all bootstrapped projects
lazy val `dotty-bootstrapped` = project.
aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`).
aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`, `dotty-doc-bootstrapped`).
settings(
publishArtifact := false
)
Expand All @@ -152,63 +152,73 @@ object Build {
).
settings(publishing)

lazy val `dotty-doc` = project.in(file("doc-tool")).
dependsOn(`dotty-compiler`, `dotty-compiler` % "test->test").
settings(sourceStructure).
settings(
baseDirectory in (Compile, run) := baseDirectory.value / "..",
baseDirectory in (Test, run) := baseDirectory.value,

connectInput in run := true,
outputStrategy := Some(StdoutOutput),

javaOptions ++= (javaOptions in `dotty-compiler`).value,
fork in run := true,
fork in Test := true,
parallelExecution in Test := false,

genDocs := Def.inputTaskDyn {
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
val sources =
(unmanagedSources in (Compile, compile)).value ++
// Settings shared between dotty-doc and dotty-doc-bootstrapped
lazy val dottyDocSettings = Seq(
baseDirectory in (Compile, run) := baseDirectory.value / "..",
baseDirectory in (Test, run) := baseDirectory.value,

connectInput in run := true,
outputStrategy := Some(StdoutOutput),

javaOptions ++= (javaOptions in `dotty-compiler`).value,
fork in run := true,
fork in Test := true,
parallelExecution in Test := false,

genDocs := Def.inputTaskDyn {
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
val sources =
(unmanagedSources in (Compile, compile)).value ++
(unmanagedSources in (`dotty-compiler`, Compile)).value
val args: Seq[String] = Seq(
"-siteroot", "docs",
"-project", "Dotty",
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
)
val args: Seq[String] = Seq(
"-siteroot", "docs",
"-project", "Dotty",
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
)
(runMain in Compile).toTask(
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
)
}.evaluated,

dottydoc := Def.inputTaskDyn {
val args: Seq[String] = spaceDelimited("<arg>").parsed
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
val cp: Seq[String] = Seq("-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps")
}.evaluated,

dottydoc := Def.inputTaskDyn {
val args: Seq[String] = spaceDelimited("<arg>").parsed
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
val cp: Seq[String] = Seq("-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps")
(runMain in Compile).toTask(s""" dotty.tools.dottydoc.Main ${cp.mkString(" ")} """ + args.mkString(" "))
}.evaluated,
}.evaluated,

libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
"com.vladsch.flexmark" % "flexmark" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-tasklist" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-tables" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-autolink" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-anchorlink" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-emoji" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-yaml-front-matter" % "0.11.1",
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.8.6",
"nl.big-o" % "liqp" % "0.6.7"
)
)

libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
"com.vladsch.flexmark" % "flexmark" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-tasklist" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-tables" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-autolink" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-anchorlink" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-emoji" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % "0.11.1",
"com.vladsch.flexmark" % "flexmark-ext-yaml-front-matter" % "0.11.1",
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.8.6",
"nl.big-o" % "liqp" % "0.6.7"
)
).
lazy val `dotty-doc` = project.in(file("doc-tool")).
dependsOn(`dotty-compiler`, `dotty-compiler` % "test->test").
settings(sourceStructure).
settings(dottyDocSettings).
settings(publishing)

lazy val `dotty-doc-bootstrapped` = project.in(file("doc-tool")).
dependsOn(`dotty-compiler-bootstrapped`, `dotty-compiler-bootstrapped` % "test->test").
settings(sourceStructure).
settings(commonBootstrappedSettings).
settings(dottyDocSettings)


lazy val `dotty-bot` = project.in(file("bot")).
settings(sourceStructure).
settings(
Expand Down