From 12e9ca3e087e1d124f462290605b361cb5414264 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 15 May 2017 15:32:52 +0200 Subject: [PATCH] Java-ize echo module --- build.sbt | 2 +- echo/src/main/java/coursier/echo/Echo.java | 22 ++++++++++++++++++++ echo/src/main/scala/coursier/echo/Echo.scala | 5 ----- scripts/travis.sh | 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 echo/src/main/java/coursier/echo/Echo.java delete mode 100644 echo/src/main/scala/coursier/echo/Echo.scala diff --git a/build.sbt b/build.sbt index cf2c62d33..f1fa11c6f 100644 --- a/build.sbt +++ b/build.sbt @@ -235,7 +235,7 @@ lazy val okhttp = project ) lazy val echo = project - .settings(shared) + .settings(pureJava) lazy val jvm = project .dummy diff --git a/echo/src/main/java/coursier/echo/Echo.java b/echo/src/main/java/coursier/echo/Echo.java new file mode 100644 index 000000000..6d0afb9da --- /dev/null +++ b/echo/src/main/java/coursier/echo/Echo.java @@ -0,0 +1,22 @@ +package coursier.echo; + +public class Echo { + + public static void main(String[] args) { + + boolean isFirst = true; + + for (String arg : args) { + + if (isFirst) + isFirst = false; + else + System.out.print(" "); + + System.out.print(arg); + } + + System.out.println(); + } + +} diff --git a/echo/src/main/scala/coursier/echo/Echo.scala b/echo/src/main/scala/coursier/echo/Echo.scala deleted file mode 100644 index 60ab2894e..000000000 --- a/echo/src/main/scala/coursier/echo/Echo.scala +++ /dev/null @@ -1,5 +0,0 @@ - -object Echo { - def main(args: Array[String]): Unit = - println(args.mkString(" ")) -} diff --git a/scripts/travis.sh b/scripts/travis.sh index 5084f56d3..2bd4bf256 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -181,7 +181,7 @@ publish() { testBootstrap() { if is211; then sbt ++${SCALA_VERSION} echo/publishLocal cli/pack - cli/target/pack/bin/coursier bootstrap -o cs-echo io.get-coursier:echo_2.11:1.0.0-SNAPSHOT + cli/target/pack/bin/coursier bootstrap -o cs-echo io.get-coursier:echo:1.0.0-SNAPSHOT if [ "$(./cs-echo foo)" != foo ]; then echo "Error: unexpected output from bootstrapped echo command." 1>&2 exit 1