Skip to content

Commit

Permalink
Support Scala 3 (#95)
Browse files Browse the repository at this point in the history
* Support Scala 3

* Set up JDK 11 in ci.yml

* Update README.md
  • Loading branch information
vmunier authored Nov 14, 2023
1 parent b64b629 commit 09f8809
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
# just make sure we can start sbt and publish locally without errors
- run: sbt +publishLocal
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ standard scala string interpolation.

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

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

## Publish a new version of the library

New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release).
New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release).
17 changes: 8 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ inThisBuild(List(
))

name := "scalajs-scripts"
scalaVersion := "2.13.12"
crossScalaVersions := Seq("2.12.18", scalaVersion.value)
scalaVersion := "3.3.1"
crossScalaVersions := Seq("2.13.12", scalaVersion.value)

enablePlugins(SbtTwirl)

scalacOptions ++= Seq(
"-encoding", "utf8",
"-deprecation", "-feature", "-unchecked", "-Xlint",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"
)
scalacOptions ++= Seq("-encoding", "utf8", "-deprecation", "-feature", "-unchecked")

libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Seq()
case _ => Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided")
})
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.6
sbt.version=1.9.7
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

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

0 comments on commit 09f8809

Please sign in to comment.