Java-ize echo module

This commit is contained in:
Alexandre Archambault 2017-05-15 15:32:52 +02:00
parent 4f0b26d7a7
commit 12e9ca3e08
4 changed files with 24 additions and 7 deletions

View File

@ -235,7 +235,7 @@ lazy val okhttp = project
)
lazy val echo = project
.settings(shared)
.settings(pureJava)
lazy val jvm = project
.dummy

View File

@ -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();
}
}

View File

@ -1,5 +0,0 @@
object Echo {
def main(args: Array[String]): Unit =
println(args.mkString(" "))
}

View File

@ -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