scalafx-utils/project/SiteSettingsPlugin.scala

28 lines
709 B
Scala
Raw Permalink Normal View History

import sbt._
import Keys._
import com.typesafe.sbt.site._
object SiteSettingsPlugin extends AutoPlugin {
2017-10-30 02:12:56 +00:00
override def trigger = allRequirements
override def requires = SiteScaladocPlugin
override lazy val projectSettings = Seq(
scalacOptions in (Compile,doc) ++= Seq(
"-groups",
"-implicits",
"-diagrams",
"-sourcepath", (baseDirectory in ThisBuild).value.getAbsolutePath
),
scalacOptions in (Compile,doc) ++= (
(BasicSettings: SettingTemplate).sourceLocation("master") match {
case Some(url) =>
val srcUrl = url + "€{FILE_PATH}.scala"
Seq("-doc-source-url", srcUrl)
case None =>
Seq.empty
}
)
)
}