diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-04 17:38:32 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-04 17:49:11 -0800 |
commit | ed389ac2d482ed6e103b7fd3e3fe840660223126 (patch) | |
tree | f83425b391dffc67f982dcaa17deeae64e77eef2 /scalalib | |
parent | 593d9f94794e6db8040e7082ba50a24d86c4cc06 (diff) | |
download | mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.tar.gz mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.tar.bz2 mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.zip |
add upstream dependencies to ivy.xml
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/mill/scalalib/PublishModule.scala | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/scalalib/src/mill/scalalib/PublishModule.scala b/scalalib/src/mill/scalalib/PublishModule.scala index 19fafaa3..8dfa0663 100644 --- a/scalalib/src/mill/scalalib/PublishModule.scala +++ b/scalalib/src/mill/scalalib/PublishModule.scala @@ -19,30 +19,23 @@ trait PublishModule extends ScalaModule { outer => def publishSelfDependency = T{ Artifact(pomSettings().organization, artifactId(), publishVersion()), } - def publishUpstreamDependencies = T{ Task.sequence(moduleDeps.map(_.publishSelfDependency)) } - def pom = T { + + def publishXmlDeps = T.task{ val ivyPomDeps = ivyDeps().map( Artifact.fromDep(_, scalaVersion(), Lib.scalaBinaryVersion(scalaVersion())) ) - - val upstreamPomDeps = publishUpstreamDependencies().map(Dependency(_, Scope.Compile)) - - val pom = Pom( - artifact(), - ivyPomDeps ++ upstreamPomDeps, - artifactId(), - pomSettings() - ) - + val modulePomDeps = Task.sequence(moduleDeps.map(_.publishSelfDependency))() + ivyPomDeps ++ modulePomDeps.map(Dependency(_, Scope.Compile)) + } + def pom = T { + val pom = Pom(artifact(), publishXmlDeps(), artifactId(), pomSettings()) val pomPath = T.ctx().dest / s"${artifactId()}-${publishVersion()}.pom" write.over(pomPath, pom) PathRef(pomPath) } def ivy = T { - val dependencies = - ivyDeps().map(Artifact.fromDep(_, scalaVersion(), Lib.scalaBinaryVersion(scalaVersion()))) - val ivy = Ivy(artifact(), dependencies) + val ivy = Ivy(artifact(), publishXmlDeps()) val ivyPath = T.ctx().dest / "ivy.xml" write.over(ivyPath, ivy) PathRef(ivyPath) |