summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci/test4.sh3
-rw-r--r--core/test/src/mill/util/ScriptTestSuite.scala4
-rw-r--r--scalalib/src/mill/scalalib/PublishModule.scala23
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)