Merge pull request #170 from dvargas46/v3-add-scala

pkg(scala-3.0.0): Add scala 3.0.0
This commit is contained in:
Thomas 2021-03-19 07:56:38 +13:00 committed by GitHub
commit 25d4d2e04f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 0 deletions

16
packages/scala/3.0.0/build.sh vendored Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Scala depends on Java
mkdir -p java
cd java
curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz
tar xzf java.tar.gz --strip-components=1
rm java.tar.gz
cd ..
mkdir -p scala
cd scala
curl -L "https://github.com/lampepfl/dotty/releases/download/3.0.0-RC1/scala3-3.0.0-RC1.tar.gz" -o scala.tar.gz
tar -xzf scala.tar.gz --strip-components=1
rm scala.tar.gz
cd ..

5
packages/scala/3.0.0/environment vendored Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Scala requires JAVA_HOME to be set
export JAVA_HOME=$PWD/java
export PATH=$PWD/scala/bin:$PATH

6
packages/scala/3.0.0/metadata.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"language": "scala",
"version": "3.0.0",
"aliases": ["scala","sc"],
"author": "Dan Vargas <danvargas46@gmail.com>"
}

4
packages/scala/3.0.0/run vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
scala -color never "$@"

3
packages/scala/3.0.0/test.scala vendored Normal file
View File

@ -0,0 +1,3 @@
@main def run(): Unit = {
println("OK")
}