Skip to content

Commit 6360a0b

Browse files
committed
Avoid deprecated scala.App
1 parent 807a7a6 commit 6360a0b

File tree

2 files changed

+12
-8
lines changed
  • src/sbt-test/sbt-buildinfo

2 files changed

+12
-8
lines changed

src/sbt-test/sbt-buildinfo/options/src/main/scala/hello/Test.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package hello
22

33
import scala.Predef._
44

5-
object Test extends scala.App {
6-
val expected = """{"name":"helloworld", "scalaVersion":"2.12.21"}"""
7-
val actual = hello.BuildInfo.toJson
8-
assert(actual == expected, "expected " + expected + " but found " + actual)
5+
object Test {
6+
def main(args: scala.Array[String]): scala.Unit = {
7+
val expected = """{"name":"helloworld", "scalaVersion":"2.12.21"}"""
8+
val actual = hello.BuildInfo.toJson
9+
assert(actual == expected, "expected " + expected + " but found " + actual)
10+
}
911
}

src/sbt-test/sbt-buildinfo/skipimportscaseobject/src/main/scala/hello/Test.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package hello
22

33
import scala.Predef._
44

5-
object Test extends scala.App {
6-
val expected = """{"name":"helloworld", "scalaVersion":"2.12.21"}"""
7-
val actual = hello.BuildInfo.toJson
8-
assert(actual == expected, "expected " + expected + " but found " + actual)
5+
object Test {
6+
def main(args: scala.Array[String]): scala.Unit = {
7+
val expected = """{"name":"helloworld", "scalaVersion":"2.12.21"}"""
8+
val actual = hello.BuildInfo.toJson
9+
assert(actual == expected, "expected " + expected + " but found " + actual)
10+
}
911
}

0 commit comments

Comments
 (0)