Skip to content

Commit

Permalink
Publish akka-osgi but do not include it in dist akka#20548
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed May 18, 2016
1 parent ebef603 commit bfeae1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions akka-osgi/build.sbt
@@ -1,7 +1,7 @@
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Dist }

AkkaBuild.defaultSettings
AkkaBuild.dontPublishSettings
Dist.includeInDist := false
Formatting.formatSettings
OSGi.osgi
Dependencies.osgi
Expand Down
3 changes: 2 additions & 1 deletion project/AkkaBuild.scala
Expand Up @@ -434,7 +434,8 @@ object AkkaBuild extends Build {
val dontPublishSettings = Seq(
publishSigned := (),
publish := (),
publishArtifact in Compile := false
publishArtifact in Compile := false,
Dist.includeInDist := false
)

val dontPublishDocsSettings = Seq(
Expand Down
4 changes: 3 additions & 1 deletion project/Dist.scala
Expand Up @@ -24,8 +24,10 @@ object Dist {
val distDocJars = TaskKey[Seq[File]]("dist-doc-jars")
val distSources = TaskKey[DistSources]("dist-sources")
val dist = TaskKey[File]("dist", "Create a zipped distribution of everything.")
val includeInDist = SettingKey[Boolean]("include-in-dist", "Include the artifact of this project in the standalone dist zip-file")

lazy val settings: Seq[Setting[_]] = Seq(
includeInDist := true,
distAllClasspaths <<= (thisProjectRef, buildStructure) flatMap aggregated(dependencyClasspath in Compile),
distDependencies <<= distAllClasspaths map { _.flatten.map(_.data).filter(ClasspathUtilities.isArchive).distinct },
distLibJars <<= (thisProjectRef, buildStructure) flatMap aggregated(packageBin in Compile),
Expand All @@ -49,7 +51,7 @@ object Dist {
def aggregatedProjects(projectRef: ProjectRef, structure: BuildStructure, scope: Scope): Seq[ProjectRef] = {
val aggregate = Project.getProject(projectRef, structure).toSeq.flatMap(_.aggregate)
aggregate flatMap { ref =>
if (!(publishArtifact in ref in scope get structure.data getOrElse false)) Nil
if (!(includeInDist in ref in scope get structure.data getOrElse false)) Nil
else ref +: aggregatedProjects(ref, structure, scope)
}
}
Expand Down

0 comments on commit bfeae1b

Please sign in to comment.