-
Notifications
You must be signed in to change notification settings - Fork 64
/
build.sbt
69 lines (63 loc) · 2.54 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ThisBuild / organization := "com.47deg"
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/47degrees/sbt-microsites"),
"scm:git:https://github.com/47degrees/sbt-microsites.git",
Some("scm:git:[email protected]:47degrees/sbt-microsites.git")
)
)
addCommandAlias(
"ci-test",
"scalafmtCheckAll; scalafmtSbtCheck; microsite/mdoc; compile; test; scripted"
)
addCommandAlias(
"ci-docs",
"github; documentation/mdoc; headerCreateAll; microsite/publishMicrosite"
)
addCommandAlias("ci-publish", "github; ci-release")
lazy val `sbt-microsites` = (project in file("."))
.settings(moduleName := "sbt-microsites")
.settings(pluginSettings: _*)
.enablePlugins(JekyllPlugin)
.enablePlugins(SbtPlugin)
lazy val microsite = project
.settings(micrositeSettings: _*)
.settings(publish / skip := true)
.enablePlugins(MicrositesPlugin)
.enablePlugins(MdocPlugin)
lazy val documentation = project
.settings(mdocOut := file("."))
.settings(publish / skip := true)
.enablePlugins(MdocPlugin)
lazy val pluginSettings: Seq[Def.Setting[_]] = Seq(
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2"),
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.7.0"),
addSbtPlugin("com.github.sbt" % "sbt-site" % "1.6.0"),
libraryDependencies ++= Seq(
"com.47deg" %% "github4s" % "0.33.3",
"org.http4s" %% "http4s-blaze-client" % "0.23.16",
"net.jcazevedo" %% "moultingyaml" % "0.4.2",
"com.lihaoyi" %% "scalatags" % "0.13.1",
"com.sksamuel.scrimage" %% "scrimage-scala" % "4.1.3",
"com.github.marklister" %% "base64" % "0.3.0",
"org.scalatest" %% "scalatest" % "3.2.18" % Test,
"org.scalatestplus" %% "scalacheck-1-16" % "3.2.14.0" % Test
),
scriptedLaunchOpts ++= Seq(
"-Xmx2048M",
"-XX:ReservedCodeCacheSize=256m",
"-XX:+UseConcMarkSweepGC",
"-Dplugin.version=" + version.value,
"-Dscala.version=" + scalaVersion.value
)
)
lazy val micrositeSettings: Seq[Def.Setting[_]] = Seq(
micrositeName := "sbt-microsites",
micrositeDescription := "An sbt plugin to create awesome microsites for your project",
micrositeBaseUrl := "sbt-microsites",
micrositeDocumentationUrl := "docs",
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
micrositePushSiteWith := GitHub4s,
micrositeGitterChannelUrl := "47deg/sbt-microsites",
makeSite / includeFilter := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md" | "*.svg"
)