Skip to content

Commit

Permalink
Integrates sbt-catalyst-ext plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpedromoreno committed Oct 20, 2016
1 parent 013ac00 commit 78d4443
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 104 deletions.
4 changes: 2 additions & 2 deletions .scalafmt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--style defaultWithAlign
--maxColumn 100
style = defaultWithAlign
maxColumn = 100
70 changes: 22 additions & 48 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sbt.Keys._
import de.heikoseeberger.sbtheader.license.Apache2_0
import catext.Dependencies._

val dev = Seq(Dev("47 Degrees (twitter: @47deg)", "47 Degrees"))
val gh = GitHubSettings("com.fortysevendeg", "sbt-microsites", "47 Degrees", apache)
val vAll = Versions(versions, libraries, scalacPlugins)

lazy val artifactSettings = Seq(
name := "sbt-microsites",
organization := "com.fortysevendeg",
organizationName := "47 Degrees",
name := gh.proj,
organization := gh.org,
organizationName := gh.publishOrg,
homepage := Option(url("http://www.47deg.com")),
organizationHomepage := Some(new URL("http://47deg.com")),
headers := Map(
Expand All @@ -20,13 +25,11 @@ lazy val pluginSettings = Seq(
"jgit-repo" at "http://download.eclipse.org/jgit/maven"
),
libraryDependencies ++= Seq(
"com.lihaoyi" %% "scalatags" % "0.6.0",
"org.scalactic" %% "scalactic" % "3.0.0",
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.2" % "test"
"com.lihaoyi" %% "scalatags" % "0.6.0",
"org.scalactic" %% "scalactic" % "3.0.0"
),
scalafmtConfig in ThisBuild := Some(file(".scalafmt"))
) ++ reformatOnCompileSettings
) ++ reformatOnCompileSettings ++ addTestLibs(vAll, "scalatest", "scalacheck")

lazy val micrositeSettings = Seq(
micrositeName := "sbt-microsites",
Expand All @@ -38,57 +41,28 @@ lazy val micrositeSettings = Seq(
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md"
)

lazy val testSettings =
ScriptedPlugin.scriptedSettings ++ Seq(
scriptedDependencies <<= (compile in Test) map { (analysis) =>
Unit
},
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq(
"-Xmx2048M",
"-XX:MaxPermSize=512M",
"-XX:ReservedCodeCacheSize=256m",
"-XX:+UseConcMarkSweepGC",
"-Dplugin.version=" + version.value,
"-Dscala.version=" + scalaVersion.value
)
}
)

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)

lazy val buildInfoSettings = Seq(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "microsites"
)

lazy val miscSettings = Seq(
shellPrompt := { s: State =>
val c = scala.Console
val blue = c.RESET + c.BLUE + c.BOLD
val white = c.RESET + c.BOLD

val projectName = Project.extract(s).currentProject.id

s"$blue$projectName$white>${c.RESET}"
}
)

lazy val commonSettings = artifactSettings ++ miscSettings
lazy val allSettings = pluginSettings ++ commonSettings ++ tutSettings ++ testSettings
lazy val allSettings = pluginSettings ++
commonSettings ++
tutSettings ++
testScriptedSettings ++
sharedReleaseProcess ++
pgpSettings ++
credentialSettings ++
sharedPublishSettings(gh, dev)

lazy val `sbt-microsites` = (project in file("."))
.settings(moduleName := "sbt-microsites")
.settings(allSettings: _*)
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.3"))
.settings(addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.4"))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0"))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4"))
.settings(addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.4"))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0"))
.settings(addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4"))
.enablePlugins(JekyllPlugin, AutomateHeaderPlugin)

lazy val docs = (project in file("docs"))
Expand Down
11 changes: 3 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.6.0")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.3.1")
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
resolvers += Resolver.sonatypeRepo("snapshots")
addSbtPlugin("com.fortysevendeg" % "sbt-catalysts-ext" % "0.0.3-SNAPSHOT")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.4.7")
libraryDependencies <+= sbtVersion("org.scala-sbt" % "scripted-plugin" % _)
// Plugin inception dependency to be able to generate the sbt-microsites' microsite
addSbtPlugin("com.fortysevendeg" % "sbt-microsites" % "0.2.5")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1")
46 changes: 0 additions & 46 deletions publish.sbt

This file was deleted.

0 comments on commit 78d4443

Please sign in to comment.