From 6a6d5c947867e6f1efe08078c1ee4f4c3e0701c7 Mon Sep 17 00:00:00 2001 From: Selman Date: Wed, 23 Jan 2019 13:36:30 +0300 Subject: [PATCH] Update README.md Added Guillaume Martres' code which is an answer in https://stackoverflow.com/questions/45342846/scala-play-with-dotty --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6a7c57a..63127c5 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,12 @@ by: libraryDependencies += ("a" %% "b" % "c").withDottyCompat(scalaVersion.value) ``` +Or you can alternatively use: + +```scala + libraryDependencies := libraryDependencies.value.map(_.withDottyCompat(scalaVersion.value)) +``` + This will have no effect when compiling with Scala 2.x, but when compiling with Dotty this will change the cross-version to a Scala 2.x one. This works because Dotty is currently retro-compatible with Scala 2.x.