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 | |
parent | 593d9f94794e6db8040e7082ba50a24d86c4cc06 (diff) | |
download | mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.tar.gz mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.tar.bz2 mill-ed389ac2d482ed6e103b7fd3e3fe840660223126.zip |
add upstream dependencies to ivy.xml
-rwxr-xr-x | ci/test4.sh | 3 | ||||
-rw-r--r-- | core/test/src/mill/util/ScriptTestSuite.scala | 4 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/PublishModule.scala | 23 |
3 files changed, 10 insertions, 20 deletions
diff --git a/ci/test4.sh b/ci/test4.sh index 2a8b1497..52fc053d 100755 --- a/ci/test4.sh +++ b/ci/test4.sh @@ -2,9 +2,6 @@ set -eux -# Force travis to create a git HEAD otherwise common operations don't work -git checkout -B current - # Starting from scratch... git clean -xdf diff --git a/core/test/src/mill/util/ScriptTestSuite.scala b/core/test/src/mill/util/ScriptTestSuite.scala index 1aa74de1..7d46feee 100644 --- a/core/test/src/mill/util/ScriptTestSuite.scala +++ b/core/test/src/mill/util/ScriptTestSuite.scala @@ -11,8 +11,8 @@ abstract class ScriptTestSuite extends TestSuite{ def scriptSourcePath: Path val workspacePath = pwd / 'target / 'workspace / workspaceSlug - val stdOutErr = new PrintStream(new ByteArrayOutputStream()) -// val stdOutErr = new PrintStream(System.out) +// val stdOutErr = new PrintStream(new ByteArrayOutputStream()) + val stdOutErr = new PrintStream(System.out) val stdIn = new ByteArrayInputStream(Array()) val runner = new mill.main.MainRunner( ammonite.main.Cli.Config(wd = workspacePath), false, 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) |