Skip to content

Commit

Permalink
Merge pull request #42 from xuwei-k/JavaUnidocPlugin-test
Browse files Browse the repository at this point in the history
add test for JavaUnidocPlugin
  • Loading branch information
eed3si9n authored Jul 29, 2017
2 parents 6a3e1e7 + 56cfa56 commit 549cdd3
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sbt-test/unidoc/java-unidoc/a/A.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package example

class A
3 changes: 3 additions & 0 deletions src/sbt-test/unidoc/java-unidoc/b/B.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package example

class B
23 changes: 23 additions & 0 deletions src/sbt-test/unidoc/java-unidoc/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
val commonSettings = Seq(
scalaVersion := "2.11.11"
)

def module(name: String) =
Project(name, file(name)).settings(
commonSettings
).enablePlugins(
GenJavadocPlugin
)

lazy val a = module("a")
lazy val b = module("b")
lazy val c = module("c")

lazy val root = project.in(file(".")).settings(
commonSettings,
unidocProjectFilter in (JavaUnidoc, unidoc) := inAnyProject -- inProjects(c)
).enablePlugins(
JavaUnidocPlugin
).aggregate(
a, b, c
)
3 changes: 3 additions & 0 deletions src/sbt-test/unidoc/java-unidoc/c/C.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package example

class C
1 change: 1 addition & 0 deletions src/sbt-test/unidoc/java-unidoc/project/plugin.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % System.getProperty("plugin.version"))
9 changes: 9 additions & 0 deletions src/sbt-test/unidoc/java-unidoc/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
> unidoc

$ exists target/javaunidoc/allclasses-frame.html
$ exists target/javaunidoc/example/A.html
$ exists target/javaunidoc/example/B.html
-$ exists target/javaunidoc/example/C.html

-$ exists target/scala-2.11/unidoc/example/A.html
-$ exists target/scala-2.11/unidoc/example/B.html

0 comments on commit 549cdd3

Please sign in to comment.