Skip to content

Commit

Permalink
Merge pull request #8 from lloydmeta/feature/scaladocs-publishing
Browse files Browse the repository at this point in the history
Neat.
  • Loading branch information
lloydmeta committed Apr 1, 2015
2 parents 2d609ec + 2ae5773 commit d7c5bbb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ can take your enum values as arguments without having to worry about erasure (fo

Compatible with Scala 2.10.x and 2.11.x

[Scaladocs](https://beachape.com/enumeratum/latest/api)

## SBT

For basic enumeratum (with no Play support):
Expand Down
23 changes: 21 additions & 2 deletions project/Enumeratum.scala → project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import sbt.Keys._
import com.typesafe.sbt.SbtScalariform._
import scalariform.formatter.preferences._
import scoverage.ScoverageSbtPlugin.ScoverageKeys._
import com.typesafe.sbt.SbtGhPages.ghpages
import com.typesafe.sbt.SbtSite.site
import sbtunidoc.Plugin.UnidocKeys._
import sbtunidoc.Plugin._
import com.typesafe.sbt.SbtGit.{GitKeys => git}

object Enumeratum extends Build {

Expand All @@ -13,10 +18,24 @@ object Enumeratum extends Build {
lazy val root = Project(id = "enumeratum-root", base = file("."), settings = commonWithPublishSettings)
.settings(
name := "enumeratum-root",
publishArtifact := false,
crossScalaVersions := scalaVersions,
crossVersion := CrossVersion.binary
).aggregate(macros, core, enumeratumPlay, enumeratumPlayJson)
)
.settings(unidocSettings: _*)
.settings(site.settings ++ ghpages.settings: _*)
.settings(
site.addMappingsToSiteDir(
mappings in (ScalaUnidoc, packageDoc), "latest/api"
),
git.gitRemoteRepo := "git@github.com:lloydmeta/enumeratum.git"
)
.settings(
scalacOptions in (ScalaUnidoc, unidoc) += "-Ymacro-no-expand",
// Do not publish the root project (it just serves as an aggregate)
publishArtifact := false,
publishLocal := {}
)
.aggregate(macros, core, enumeratumPlay, enumeratumPlayJson)

lazy val core = Project(id = "enumeratum", base = file("enumeratum-core"), settings = commonWithPublishSettings)
.settings(
Expand Down
13 changes: 12 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"

resolvers += Classpaths.sbtPluginReleases

// for code formatting
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.1")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0.BETA1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0.BETA1")

// Provides the ability to generate unifed documentation for multiple projects
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.1")

// Provides site generation functionality
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")

// Provides auto-generating and publishing a gh-pages site
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")

0 comments on commit d7c5bbb

Please sign in to comment.