Skip to content

Commit d7c5bbb

Browse files
committed
Merge pull request #8 from lloydmeta/feature/scaladocs-publishing
Neat.
2 parents 2d609ec + 2ae5773 commit d7c5bbb

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ can take your enum values as arguments without having to worry about erasure (fo
1313

1414
Compatible with Scala 2.10.x and 2.11.x
1515

16+
[Scaladocs](https://beachape.com/enumeratum/latest/api)
17+
1618
## SBT
1719

1820
For basic enumeratum (with no Play support):
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import sbt.Keys._
33
import com.typesafe.sbt.SbtScalariform._
44
import scalariform.formatter.preferences._
55
import scoverage.ScoverageSbtPlugin.ScoverageKeys._
6+
import com.typesafe.sbt.SbtGhPages.ghpages
7+
import com.typesafe.sbt.SbtSite.site
8+
import sbtunidoc.Plugin.UnidocKeys._
9+
import sbtunidoc.Plugin._
10+
import com.typesafe.sbt.SbtGit.{GitKeys => git}
611

712
object Enumeratum extends Build {
813

@@ -13,10 +18,24 @@ object Enumeratum extends Build {
1318
lazy val root = Project(id = "enumeratum-root", base = file("."), settings = commonWithPublishSettings)
1419
.settings(
1520
name := "enumeratum-root",
16-
publishArtifact := false,
1721
crossScalaVersions := scalaVersions,
1822
crossVersion := CrossVersion.binary
19-
).aggregate(macros, core, enumeratumPlay, enumeratumPlayJson)
23+
)
24+
.settings(unidocSettings: _*)
25+
.settings(site.settings ++ ghpages.settings: _*)
26+
.settings(
27+
site.addMappingsToSiteDir(
28+
mappings in (ScalaUnidoc, packageDoc), "latest/api"
29+
),
30+
git.gitRemoteRepo := "git@github.com:lloydmeta/enumeratum.git"
31+
)
32+
.settings(
33+
scalacOptions in (ScalaUnidoc, unidoc) += "-Ymacro-no-expand",
34+
// Do not publish the root project (it just serves as an aggregate)
35+
publishArtifact := false,
36+
publishLocal := {}
37+
)
38+
.aggregate(macros, core, enumeratumPlay, enumeratumPlayJson)
2039

2140
lazy val core = Project(id = "enumeratum", base = file("enumeratum-core"), settings = commonWithPublishSettings)
2241
.settings(

project/plugins.sbt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
// The Typesafe repository
22
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
33

4+
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
5+
46
resolvers += Classpaths.sbtPluginReleases
57

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

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

11-
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0.BETA1")
13+
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0.BETA1")
14+
15+
// Provides the ability to generate unifed documentation for multiple projects
16+
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.1")
17+
18+
// Provides site generation functionality
19+
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
20+
21+
// Provides auto-generating and publishing a gh-pages site
22+
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")

0 commit comments

Comments
 (0)