Skip to content

Commit 09f8809

Browse files
authored
Support Scala 3 (#95)
* Support Scala 3 * Set up JDK 11 in ci.yml * Update README.md
1 parent b64b629 commit 09f8809

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Set up JDK 1.8
16+
- name: Set up JDK 11
1717
uses: actions/setup-java@v1
1818
with:
19-
java-version: 1.8
19+
java-version: 11
2020
# just make sure we can start sbt and publish locally without errors
2121
- run: sbt +publishLocal

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ standard scala string interpolation.
1111

1212
Add the library to `build.sbt`:
1313
```
14-
libraryDependencies += "com.vmunier" %% "scalajs-scripts" % "1.2.0"
14+
libraryDependencies += "com.vmunier" %% "scalajs-scripts" % "1.3.0"
1515
```
1616

1717
## Integration with Twirl
@@ -108,4 +108,4 @@ The `raw` function in ScalaTags allows you to embed raw HTML in the tag and call
108108

109109
## Publish a new version of the library
110110

111-
New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release).
111+
New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release).

build.sbt

+8-9
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ inThisBuild(List(
1414
))
1515

1616
name := "scalajs-scripts"
17-
scalaVersion := "2.13.12"
18-
crossScalaVersions := Seq("2.12.18", scalaVersion.value)
17+
scalaVersion := "3.3.1"
18+
crossScalaVersions := Seq("2.13.12", scalaVersion.value)
1919

2020
enablePlugins(SbtTwirl)
2121

22-
scalacOptions ++= Seq(
23-
"-encoding", "utf8",
24-
"-deprecation", "-feature", "-unchecked", "-Xlint",
25-
"-Ywarn-dead-code",
26-
"-Ywarn-numeric-widen",
27-
"-Ywarn-value-discard"
28-
)
22+
scalacOptions ++= Seq("-encoding", "utf8", "-deprecation", "-feature", "-unchecked")
23+
24+
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
25+
case Some((3, _)) => Seq()
26+
case _ => Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided")
27+
})

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.9.6
1+
sbt.version=1.9.7

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
22

3-
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.1")
3+
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "2.0.1")
44
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

0 commit comments

Comments
 (0)