forked from sbt/sbt-unidoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sbt#27 Add a scripted test for checking crossproject setup
- Loading branch information
Showing
11 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "2.1.0") | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3") | ||
|
||
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sbtcrossproject.{crossProject, CrossType} | ||
|
||
lazy val a = project | ||
|
||
lazy val x = crossProject(JSPlatform, JVMPlatform) | ||
.crossType(CrossType.Full) | ||
|
||
lazy val xJs = x.js | ||
lazy val xJvm = x.jvm | ||
|
||
lazy val root = project.in(file(".")) | ||
.settings( | ||
unidocProjectFilter in (ScalaUnidoc, unidoc) := { | ||
inAnyProject -- inProjects(xJs) | ||
} | ||
) | ||
.enablePlugins(ScalaUnidocPlugin) | ||
.aggregate(a, xJs, xJvm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22") | ||
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.3.1") | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.3.1") | ||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % System.getProperty("plugin.version")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
> unidoc | ||
|
||
$ exists target/scala-2.12/unidoc/crossproject/index.html | ||
$ exists target/scala-2.12/unidoc/crossproject/Logger.html | ||
$ exists target/scala-2.12/unidoc/crossproject/LoggerImpl.html |
12 changes: 12 additions & 0 deletions
12
src/sbt-test/unidoc/crossproject/x/js/src/main/scala/Logger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package crossproject | ||
|
||
import scala.scalajs.js.Dynamic.global | ||
|
||
class LoggerImpl extends Logger { | ||
def log(s: String) = { | ||
val document = global.document | ||
val newP = document.createElement("p") | ||
newP.innerHTML = "s" | ||
document.appendChild(newP) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/sbt-test/unidoc/crossproject/x/jvm/src/main/scala/Logger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package crossproject | ||
|
||
class LoggerImpl extends Logger { | ||
def log(s: String) = println(s) | ||
} |
5 changes: 5 additions & 0 deletions
5
src/sbt-test/unidoc/crossproject/x/shared/src/main/scala/Logger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package crossproject | ||
|
||
trait Logger { | ||
def log(s: String) | ||
} |