Permalink
Browse files

Also compile dependencies files and distribute as sbt plugin

  • Loading branch information...
lefou committed Dec 17, 2018
1 parent db9e089 commit 82d83c23af6e7466edfc1dfe7a55bdf228aabe1b
@@ -102,6 +102,7 @@ lazy val blendedStreams = BlendedStreams.project
lazy val blendedStreamsDispatcher = BlendedStreamsDispatcher.project
lazy val blendedStreamsTestsupport = BlendedStreamsTestsupport.project
lazy val blendedDocs = BlendedDocsJs.project
lazy val blendedDependencies = BlendedDependencies.project

lazy val jvmProjects : Seq[ProjectReference] = Seq(
blendedUtilLogging,
@@ -182,6 +183,6 @@ lazy val root = {
.settings(PublishConfig.doPublish)
.enablePlugins(ScalaUnidocPlugin, JBake)
.settings(RootSettings(BlendedDocsJs.project))
.settings(ExportDependencies.settings)
.aggregate((jvmProjects ++ jsProjects):_*)
// .settings(ExportDependencies.settings)
.aggregate((jvmProjects ++ jsProjects ++ Seq[ProjectReference](BlendedDependencies.project)):_*)
}
@@ -0,0 +1,38 @@
import sbt._
import sbt.plugins.SbtPlugin

object BlendedDependencies extends ProjectFactory {

val exportDependenciesFile = taskKey[File]("Export project dependencies as Scala file")

private val helper = new ProjectSettings(
projectName = "blended.dependencies",
description = "Blended dependencies",
osgi = false
) {

override def settings: Seq[sbt.Setting[_]] =
super.settings ++
Seq(
exportDependenciesFile := {
file("project/Dependencies.scala")
}
) ++
addArtifact(
Artifact(
name = projectName,
`type` = "dependencies",
extension = "scala",
classifier = "dependencies"
),
exportDependenciesFile
)

override def extraPlugins: Seq[AutoPlugin] = Seq(
SbtPlugin
)

}

override val project = helper.baseProject
}

This file was deleted.

Oops, something went wrong.

0 comments on commit 82d83c2

Please sign in to comment.