Skip to content

Commit

Permalink
Also export compileIvyDeps as provided scope
Browse files Browse the repository at this point in the history
Fixes #535
  • Loading branch information
lefou committed Feb 8, 2019
1 parent f6b0553 commit 82331f1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scalalib/src/PublishModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ trait PublishModule extends JavaModule { outer =>

def publishXmlDeps = T.task {
val ivyPomDeps = ivyDeps().map(resolvePublishDependency().apply(_))

val compileIvyPomDeps = compileIvyDeps()
.map(resolvePublishDependency().apply(_))
.filter(!ivyPomDeps.contains(_))
.map(_.copy(scope = Scope.Provided))

val modulePomDeps = Task.sequence(moduleDeps.map(_.publishSelfDependency))()
ivyPomDeps ++ modulePomDeps.map(Dependency(_, Scope.Compile))

ivyPomDeps ++ compileIvyPomDeps ++ modulePomDeps.map(Dependency(_, Scope.Compile))
}

def pom = T {
val pom = Pom(artifactMetadata(), publishXmlDeps(), artifactId(), pomSettings())
val pomPath = T.ctx().dest / s"${artifactId()}-${publishVersion()}.pom"
Expand Down

0 comments on commit 82331f1

Please sign in to comment.