From 03afce4a1262acc57ff9a585baf62d925db9c3f5 Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Sun, 16 Mar 2014 12:17:27 +0400 Subject: [PATCH] Adds experimental sample of Scala code. Unfortunately, TeaVM can't compile it due to missing JCL classes. --- pom.xml | 6 ++ teavm-scala-samples/pom.xml | 79 +++++++++++++++++++ .../org/teavm/scala/samples/HelloWorld.scala | 11 +++ 3 files changed, 96 insertions(+) create mode 100644 teavm-scala-samples/pom.xml create mode 100644 teavm-scala-samples/src/main/scala/org/teavm/scala/samples/HelloWorld.scala diff --git a/pom.xml b/pom.xml index 1e430b183..54a5c89c7 100644 --- a/pom.xml +++ b/pom.xml @@ -44,5 +44,11 @@ teavm-html4j + + enable-scala + + teavm-scala-samples + + \ No newline at end of file diff --git a/teavm-scala-samples/pom.xml b/teavm-scala-samples/pom.xml new file mode 100644 index 000000000..2cbb9f376 --- /dev/null +++ b/teavm-scala-samples/pom.xml @@ -0,0 +1,79 @@ + + 4.0.0 + + + org.teavm + teavm + 0.0.1-SNAPSHOT + + teavm-scala-samples + + + + org.teavm + teavm-core + 0.0.1-SNAPSHOT + + + org.teavm + teavm-dom + 0.0.1-SNAPSHOT + + + + + src/main/scala + src/test/scala + + + net.alchim31.maven + scala-maven-plugin + 3.1.6 + + + + compile + testCompile + + + + + 2.10.0 + + + + org.teavm + teavm-maven-plugin + ${project.version} + + + org.teavm + teavm-classlib + 0.0.1-SNAPSHOT + + + org.scala-lang + scala-library + 2.10.0 + + + + + generate-hello + + build-javascript + + process-classes + + false + org.teavm.scala.samples.HelloWorld + true + ${project.build.directory}/javascript + + + + + + + \ No newline at end of file diff --git a/teavm-scala-samples/src/main/scala/org/teavm/scala/samples/HelloWorld.scala b/teavm-scala-samples/src/main/scala/org/teavm/scala/samples/HelloWorld.scala new file mode 100644 index 000000000..5d50c2bbd --- /dev/null +++ b/teavm-scala-samples/src/main/scala/org/teavm/scala/samples/HelloWorld.scala @@ -0,0 +1,11 @@ +package org.teavm.scala.samples + +/** + * + * @author Alexey Andreev + */ +object HelloWorld { + def main(args : Array[String]) { + print("Hello") + } +} \ No newline at end of file