-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 1 and issue 2 - getGroup and registerEntityToGroup created
- Loading branch information
Timothy Hahn
committed
Feb 9, 2014
1 parent
8342ae3
commit 1f5b651
Showing
4 changed files
with
83 additions
and
5 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 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 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,5 @@ | ||
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven" | ||
|
||
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0") | ||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.0") |
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,54 @@ | ||
// From: https://github.com/akka/akka/blob/master/project/Unidoc.scala | ||
// and https://github.com/twitter/finagle/tree/master/project | ||
|
||
import sbt._ | ||
import sbt.Keys._ | ||
import sbt.Project.Initialize | ||
|
||
object Unidoc { | ||
val unidocDirectory = SettingKey[File]("unidoc-directory") | ||
val unidocExclude = SettingKey[Seq[String]]("unidoc-exclude") | ||
val unidocAllSources = TaskKey[Seq[Seq[File]]]("unidoc-all-sources") | ||
val unidocSources = TaskKey[Seq[File]]("unidoc-sources") | ||
val unidocAllClasspaths = TaskKey[Seq[Classpath]]("unidoc-all-classpaths") | ||
val unidocClasspath = TaskKey[Seq[File]]("unidoc-classpath") | ||
val unidoc = TaskKey[File]("unidoc", "Create unified scaladoc for all aggregates") | ||
|
||
lazy val settings = Seq( | ||
unidocDirectory <<= crossTarget / "unidoc", | ||
unidocExclude := Seq.empty, | ||
unidocAllSources <<= (thisProjectRef, buildStructure, unidocExclude) flatMap allSources, | ||
unidocSources <<= unidocAllSources map { _.flatten }, | ||
unidocAllClasspaths <<= (thisProjectRef, buildStructure, unidocExclude) flatMap allClasspaths, | ||
unidocClasspath <<= unidocAllClasspaths map { _.flatten.map(_.data).distinct }, | ||
unidoc <<= unidocTask | ||
) | ||
|
||
def allSources(projectRef: ProjectRef, structure: Load.BuildStructure, exclude: Seq[String]): Task[Seq[Seq[File]]] = { | ||
val projects = aggregated(projectRef, structure, exclude) | ||
projects flatMap { sources in Compile in LocalProject(_) get structure.data } join | ||
} | ||
|
||
def allClasspaths(projectRef: ProjectRef, structure: Load.BuildStructure, exclude: Seq[String]): Task[Seq[Classpath]] = { | ||
val projects = aggregated(projectRef, structure, exclude) | ||
projects flatMap { dependencyClasspath in Compile in LocalProject(_) get structure.data } join | ||
} | ||
|
||
def aggregated(projectRef: ProjectRef, structure: Load.BuildStructure, exclude: Seq[String]): Seq[String] = { | ||
val aggregate = Project.getProject(projectRef, structure).toSeq.flatMap(_.aggregate) | ||
aggregate flatMap { ref => | ||
if (exclude contains ref.project) Seq.empty | ||
else ref.project +: aggregated(ref, structure, exclude) | ||
} | ||
} | ||
|
||
def unidocTask: Initialize[Task[File]] = { | ||
(compilers, cacheDirectory, unidocSources, unidocClasspath, unidocDirectory, scalacOptions in doc, streams) map { | ||
(compilers, cache, sources, classpath, target, options, s) => { | ||
val scaladoc = new Scaladoc(100, compilers.scalac) | ||
scaladoc.cached(cache / "unidoc", "main", sources, classpath, target, options, s.log) | ||
target | ||
} | ||
} | ||
} | ||
} |