-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michel Davit
committed
Jan 9, 2024
1 parent
43ce752
commit 937b333
Showing
23 changed files
with
377 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
*/ | ||
import sbt._ | ||
import sbtprotoc.ProtocPlugin.ProtobufConfig | ||
import com.github.sbt.git.SbtGit.GitKeys.gitRemoteRepo | ||
import com.typesafe.tools.mima.core._ | ||
|
||
val magnoliaScala2Version = "1.1.6" | ||
|
@@ -624,3 +625,84 @@ lazy val jmh: Project = project | |
"org.tensorflow" % "tensorflow-core-api" % tensorflowVersion % Test | ||
) | ||
) | ||
|
||
// ======================================================================= | ||
// Site settings | ||
// ======================================================================= | ||
lazy val site = project | ||
.in(file("site")) | ||
.enablePlugins( | ||
ParadoxSitePlugin, | ||
ParadoxMaterialThemePlugin, | ||
GhpagesPlugin, | ||
SiteScaladocPlugin, | ||
MdocPlugin | ||
) | ||
.dependsOn( | ||
avro % "compile->compile,provided", | ||
bigquery % "compile->compile,provided", | ||
bigtable % "compile->compile,provided", | ||
cats % "compile->compile,provided", | ||
datastore % "compile->compile,provided", | ||
guava % "compile->compile,provided", | ||
neo4j % "compile->compile,provided", | ||
parquet % "compile->compile,provided", | ||
protobuf % "compile->compile,provided", | ||
refined % "compile->compile,provided", | ||
shared, | ||
scalacheck % "compile->compile,provided", | ||
tensorflow % "compile->compile,provided", | ||
unidocs | ||
) | ||
.settings(commonSettings) | ||
.settings( | ||
description := "Magnolify - Documentation", | ||
fork := false, | ||
publish / skip := true, | ||
autoAPIMappings := true, | ||
gitRemoteRepo := "[email protected]:spotify/magnolify.git", | ||
// mdoc | ||
// pre-compile md using mdoc | ||
mdocIn := (paradox / sourceDirectory).value, | ||
mdocExtraArguments ++= Seq("--no-link-hygiene"), | ||
// paradox | ||
Compile / paradox / sourceManaged := mdocOut.value, | ||
paradoxProperties ++= Map( | ||
"github.base_url" -> "https://github.com/spotify/magnolify" | ||
), | ||
Compile / paradoxMaterialTheme := ParadoxMaterialTheme() | ||
.withFavicon("images/favicon.ico") | ||
.withColor("white", "indigo") | ||
.withLogo("images/logo.png") | ||
.withCopyright("Copyright (C) 2024 Spotify AB") | ||
.withRepository(uri("https://github.com/spotify/magnolify")) | ||
.withSocial(uri("https://github.com/spotify"), uri("https://twitter.com/spotifyeng")), | ||
// sbt-site | ||
addMappingsToSiteDir( | ||
unidocs / ScalaUnidoc / packageDoc / mappings, | ||
unidocs / ScalaUnidoc / siteSubdirName | ||
), | ||
makeSite := makeSite.dependsOn(mdoc.toTask("")).value | ||
) | ||
|
||
lazy val unidocs = project | ||
.in(file("unidocs")) | ||
.enablePlugins(TypelevelUnidocPlugin) | ||
.settings(commonSettings) | ||
.settings( | ||
moduleName := "magnolify-docs", | ||
crossScalaVersions := Seq(scalaDefault), | ||
scalaVersion := scalaDefault, | ||
// unidoc | ||
ScalaUnidoc / siteSubdirName := "api", | ||
ScalaUnidoc / scalacOptions := Seq.empty, | ||
ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(test, jmh), | ||
ScalaUnidoc / unidoc / unidocAllClasspaths ~= { cp => | ||
// somehow protobuf 2 is in classpath and fails doc | ||
cp.map(_.filterNot(_.data.getName.endsWith("protobuf-java-2.5.0.jar"))) | ||
}, | ||
ScalaUnidoc / unidoc / unidocAllSources ~= { sources => | ||
// filter out doc from generated proto TFMD sources | ||
sources.map(_.filterNot(_.getPath.contains("compiled_proto"))) | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.3") | ||
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0") | ||
addSbtPlugin("com.github.sbt" % "sbt-site-paradox" % "1.5.0") | ||
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") | ||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.5") | ||
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6") | ||
addSbtPlugin("io.github.jonas" % "sbt-paradox-material-theme" % "0.6.0") | ||
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") | ||
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.3") | ||
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!-- HTML meta refresh URL redirection --> | ||
<meta http-equiv="refresh" content="0; url=api/magnolify/index.html"> | ||
</head> | ||
<body> | ||
<p>The page has moved to: <a href="api/magnolify/index.html">this page</a></p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.