Skip to content

Commit

Permalink
Upgrade scala.js example
Browse files Browse the repository at this point in the history
  • Loading branch information
dispalt authored and thesamet committed Sep 21, 2020
1 parent 8725b8b commit c920177
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 4 additions & 1 deletion examples/scalajs-multiproject/build.sbt
@@ -1,5 +1,7 @@
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

ThisBuild / scalaVersion := "2.13.3"

lazy val proto = (crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Pure) in file("proto"))
.settings(
PB.targets in Compile := Seq(
Expand All @@ -19,7 +21,8 @@ lazy val protoJVM = proto.jvm
lazy val client = (project in file("client"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "client"
name := "client",
scalaJSUseMainModuleInitializer := true
)
.dependsOn(protoJs)

Expand Down
@@ -1,7 +1,5 @@
import scala.scalajs.js.JSApp

object Main extends JSApp {
def main(): Unit = {
object Main {
def main(args: Array[String]): Unit = {
println(myproto.test.Test(foo = Some(13)).foo)
}
}
8 changes: 4 additions & 4 deletions examples/scalajs-multiproject/project/plugins.sbt
@@ -1,7 +1,7 @@
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.25" exclude ("com.thesamet.scalapb", "protoc-bridge_2.10"))
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.0-RC2")

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin-shaded" % "0.9.0"
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.10.8"

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.2.0")

0 comments on commit c920177

Please sign in to comment.