diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0f67472 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +on: + pull_request: + push: +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: adopt + cache: sbt + - uses: bytecodealliance/actions/wasmtime/setup@4ca3c24fa6343fdf26640108786a1493d1a39907 # v1.0.0 + - run: wasmtime --version + - run: node --version + - run: npm --version + - run: sbt "teavmJS/run js" + - run: sbt "teavmWasm/run wasm" + - run: sbt "teavmWasi/run wasi" + - run: wasmtime target/scala-2.13/teavm/wasi/main.wasm diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..cf1a8e1 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# sbt-teavm example diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..de2a2be --- /dev/null +++ b/build.sbt @@ -0,0 +1,7 @@ +scalaVersion := "2.13.12" + +enablePlugins(SbtTeaVM) + +scalacOptions ++= Seq( + "-deprecation", +) diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..e8a1e24 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.9.7 diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..ee5439d --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("io.github.sbt-teavm" % "sbt-teavm" % "0.1.0") diff --git a/src/main/scala/example/Main.scala b/src/main/scala/example/Main.scala new file mode 100644 index 0000000..bb661fd --- /dev/null +++ b/src/main/scala/example/Main.scala @@ -0,0 +1,7 @@ +package example + +object Main { + def main(args: Array[String]): Unit = { + println(s"hello sbt-teavm ${args.mkString(" ")}") + } +}