Skip to content
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

WIP: integrate sbt-doctest #1260

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
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
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3065,7 +3065,9 @@ lazy val `izumi` = (project in file("."))
scmInfo in ThisBuild := Some(ScmInfo(url("https://github.com/7mind/izumi"), "scm:git:https://github.com/7mind/izumi.git")),
scalacOptions in ThisBuild ++= Seq(
s"-Xmacro-settings:scalatest-version=${V.scalatest}"
)
),
doctestOnlyCodeBlocksMode in ThisBuild := true,
doctestTestFramework in ThisBuild := DoctestTestFramework.ScalaTest
)
.disablePlugins(AssemblyPlugin)
.aggregate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import scala.reflect.macros.blackbox
/**
* To see macro debug output during compilation, set `-Dizumi.debug.macro.distage.functoid=true` java property!
*
* {{{
* {{{"""
* sbt -Dizumi.debug.macro.distage.functoid=true compile
* }}}
* """}}}
*
* @see [[izumi.distage.constructors.DebugProperties]]
*/
Expand Down
4 changes: 4 additions & 0 deletions project/Deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ object Izumi {

object PV {
val sbt_mdoc = Version.VExpr("PV.sbt_mdoc")
val sbt_doctest = Version.VExpr("PV.sbt_doctest")
val sbt_paradox_material_theme = Version.VExpr("PV.sbt_paradox_material_theme")
val sbt_ghpages = Version.VExpr("PV.sbt_ghpages")
val sbt_site = Version.VExpr("PV.sbt_site")
Expand Down Expand Up @@ -231,6 +232,8 @@ object Izumi {
"scalacOptions" in SettingScope.Build ++= Seq(
"""s"-Xmacro-settings:scalatest-version=${V.scalatest}"""".raw
),
"doctestOnlyCodeBlocksMode" in SettingScope.Build := true,
"doctestTestFramework" in SettingScope.Build := """DoctestTestFramework.ScalaTest""".raw,
)

final val sharedSettings = Defaults.SbtMetaOptions ++ Seq(
Expand Down Expand Up @@ -705,6 +708,7 @@ object Izumi {
SbtPlugin("com.typesafe.sbt", "sbt-ghpages", PV.sbt_ghpages),
SbtPlugin("io.github.jonas", "sbt-paradox-material-theme", PV.sbt_paradox_material_theme),
SbtPlugin("org.scalameta", "sbt-mdoc", PV.sbt_mdoc),
SbtPlugin("com.github.tkawachi", "sbt-doctest", PV.sbt_doctest),
),
)
}
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ addSbtPlugin("io.github.jonas" % "sbt-paradox-material-theme" % PV.sbt_paradox_m

addSbtPlugin("org.scalameta" % "sbt-mdoc" % PV.sbt_mdoc)

addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % PV.sbt_doctest)

1 change: 1 addition & 0 deletions project/project/PluginVersions.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
object PV {
val sbt_mdoc = "2.2.9"
val sbt_doctest = "0.9.7"
val sbt_paradox_material_theme = "0.6.0"
val sbt_ghpages = "0.6.3"
val sbt_site = "1.3.3"
Expand Down