diff --git a/sbt/src/sbt-test/actions/doc-file-options/build.sbt b/sbt/src/sbt-test/actions/doc-file-options/build.sbt index be9255579..2c56831c1 100644 --- a/sbt/src/sbt-test/actions/doc-file-options/build.sbt +++ b/sbt/src/sbt-test/actions/doc-file-options/build.sbt @@ -2,15 +2,16 @@ val newContents = "bbbbbbbbb" val rootContentFile = "root.txt" -scalaVersion := "2.10.2" +ThisBuild / scalaVersion := "2.12.8" -scalacOptions in (Compile, doc) := Seq("-doc-root-content", rootContentFile) - -TaskKey[Unit]("changeRootContent") := { - IO.write(file(rootContentFile), newContents) -} - -TaskKey[Unit]("check") := { - val packageHtml = (target in Compile in doc).value / "package.html" - assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" ) -} +lazy val root = (project in file(".")) + .settings( + Compile / doc / scalacOptions := Seq("-doc-root-content", rootContentFile), + TaskKey[Unit]("changeRootContent") := { + IO.write(file(rootContentFile), newContents) + }, + TaskKey[Unit]("check") := { + val packageHtml = (Compile / doc / target).value / "index.html" + assert(IO.read(packageHtml).contains(newContents), s"does not contains ${newContents} in ${packageHtml}" ) + } + )