scala part 1 init
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
mozart2-binary
|
||||
sbt
|
||||
scala
|
||||
scalafmt
|
||||
];
|
||||
shellHook = ''
|
||||
echo "enjoy m*oz*art2"
|
||||
|
||||
4
scala_project_2025/part1/.gitignore
vendored
Normal file
4
scala_project_2025/part1/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
target/
|
||||
project/
|
||||
.bloop/
|
||||
.metals/
|
||||
2
scala_project_2025/part1/.scalafmt.conf
Normal file
2
scala_project_2025/part1/.scalafmt.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
version = "3.9.6"
|
||||
runner.dialect = scala3
|
||||
8
scala_project_2025/part1/README.md
Normal file
8
scala_project_2025/part1/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
## sbt project compiled with Scala 3
|
||||
|
||||
### Usage
|
||||
|
||||
This is a normal sbt project. You can compile code with `sbt compile`, run it with `sbt run`, and `sbt console` will start a Scala 3 REPL.
|
||||
|
||||
For more information on the sbt-dotty plugin, see the
|
||||
[scala3-example-project](https://github.com/scala/scala3-example-project/blob/main/README.md).
|
||||
10
scala_project_2025/part1/build.sbt
Normal file
10
scala_project_2025/part1/build.sbt
Normal file
@@ -0,0 +1,10 @@
|
||||
val scala3Version = "3.7.3"
|
||||
|
||||
lazy val root = project
|
||||
.in(file("."))
|
||||
.settings(
|
||||
name := "part1",
|
||||
version := "0.1.0-SNAPSHOT",
|
||||
scalaVersion := scala3Version,
|
||||
libraryDependencies += "org.scalameta" %% "munit" % "1.0.0" % Test
|
||||
)
|
||||
9
scala_project_2025/part1/src/test/scala/MySuite.scala
Normal file
9
scala_project_2025/part1/src/test/scala/MySuite.scala
Normal file
@@ -0,0 +1,9 @@
|
||||
// For more information on writing tests, see
|
||||
// https://scalameta.org/munit/docs/getting-started.html
|
||||
class MySuite extends munit.FunSuite {
|
||||
test("example test that succeeds") {
|
||||
val obtained = 42
|
||||
val expected = 42
|
||||
assertEquals(obtained, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user