Skip to content

Commit

Permalink
Update Scala 2.12 to 2.12.6 (#1345)
Browse files Browse the repository at this point in the history
* Update Scala 2.12 to 2.12.6

- Requires updating genjavadoc to 0.11.
- This, in turn, requires disabling it in any projects that cross build
  with Scala 2.10.

* Make Unidoc opt in instead of opt out

Add it to `RuntimeLibPlugins` so that all of the modules that need it
have it enabled automatically.
  • Loading branch information
denis554 committed May 18, 2018
1 parent 031310e commit f4195a1
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bin/test-2.12
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

. "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/scriptLib"

runSbtNoisy "+++2.12.4 test"
runSbtNoisy "+++2.12.6 test"
2 changes: 1 addition & 1 deletion bin/test-sbt-1.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/scriptLib"

SCALA_VERSION="2.12.4"
SCALA_VERSION="2.12.6"

runSbt +publishLocal
runSbtNoisy "++${SCALA_VERSION} scripted"
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ lazy val root = (project in file("."))
.settings(UnidocRoot.settings(javadslProjects.map(Project.projectToRef), scaladslProjects.map(Project.projectToRef)): _*)
.aggregate((javadslProjects ++ scaladslProjects ++ coreProjects ++ otherProjects ++ sbtScriptedProjects).map(Project.projectToRef): _*)

def RuntimeLibPlugins = AutomateHeaderPlugin && Sonatype && PluginsAccessor.exclude(BintrayPlugin)
def RuntimeLibPlugins = AutomateHeaderPlugin && Sonatype && PluginsAccessor.exclude(BintrayPlugin) && Unidoc
def SbtPluginPlugins = AutomateHeaderPlugin && BintrayPlugin && PluginsAccessor.exclude(Sonatype)

lazy val api = (project in file("service/core/api"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ object LagomPlugin extends AutoPlugin with LagomPluginCompat {
.settings(IvyPlugin.projectSettings: _*)
.settings(JvmPlugin.projectSettings: _*)
.settings(
scalaVersion := "2.12.4",
scalaVersion := "2.12.6",
libraryDependencies += LagomImport.component("lagom-service-locator"),
lagomServiceLocatorStart in ThisBuild := startServiceLocatorTask.value,
lagomServiceLocatorStop in ThisBuild := Servers.ServiceLocator.tryStop(new SbtLoggerProxy(state.value.log))
Expand All @@ -387,7 +387,7 @@ object LagomPlugin extends AutoPlugin with LagomPluginCompat {
.settings(IvyPlugin.projectSettings: _*)
.settings(JvmPlugin.projectSettings: _*)
.settings(
scalaVersion := "2.12.4",
scalaVersion := "2.12.6",
libraryDependencies += LagomImport.component("lagom-cassandra-server"),
lagomCassandraStart in ThisBuild := startCassandraServerTask.value,
lagomCassandraStop in ThisBuild := Servers.CassandraServer.tryStop(new SbtLoggerProxy(state.value.log))
Expand All @@ -399,7 +399,7 @@ object LagomPlugin extends AutoPlugin with LagomPluginCompat {
.settings(IvyPlugin.projectSettings: _*)
.settings(JvmPlugin.projectSettings: _*)
.settings(
scalaVersion := "2.12.4",
scalaVersion := "2.12.6",
libraryDependencies += LagomImport.component("lagom-kafka-server"),
lagomKafkaStart in ThisBuild := startKafkaServerTask.value,
lagomKafkaStop in ThisBuild := Servers.KafkaServer.tryStop(new SbtLoggerProxy(state.value.log))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lazy val `my-project` = (project in file(".")).enablePlugins(LagomJava)
libraryDependencies ++= Seq(lagomJavadslPersistenceCassandra, lagomSbtScriptedLibrary)
)

scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")

interactionMode := com.lightbend.lagom.sbt.NonBlockingInteractionMode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ lagomServicesPortRange in ThisBuild := PortRange(10000, 10001)
lazy val a = (project in file("a")).enablePlugins(LagomJava)
.settings(Seq(
sourceDirectory := baseDirectory.value / "src-a",
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")
))

lazy val b = (project in file("b")).enablePlugins(LagomJava)
.settings(Seq(
sourceDirectory := baseDirectory.value / "src-b",
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")
))

InputKey[Unit]("verifyPortProjA") := {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.lightbend.lagom.sbt.Internal.Keys.interactionMode
import com.lightbend.lagom.sbt.Internal

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import play.sbt.PlayImport

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

lagomCassandraEnabled in ThisBuild := false
lagomKafkaEnabled in ThisBuild := false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import play.sbt.PlayImport

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

lagomCassandraEnabled in ThisBuild := false
lagomKafkaEnabled in ThisBuild := false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ organization in ThisBuild := "com.example"
version in ThisBuild := "1.0-SNAPSHOT"

// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

lazy val `server-backend-switch` = (project in file("."))
.aggregate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode
lazy val `my-project` = (project in file(".")).enablePlugins(LagomJava)
.settings(libraryDependencies ++= Seq(lagomJavadslPersistenceCassandra, lagomSbtScriptedLibrary))

scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")

interactionMode := com.lightbend.lagom.sbt.NonBlockingInteractionMode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode

interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

lazy val `a-api` = (project in file("a") / "api")
.settings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode

interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

val macwire = "com.softwaremill.macwire" %% "macros" % "2.2.5" % "provided"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode

interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion in ThisBuild := sys.props.get("scala.version").getOrElse("2.12.6")

lazy val p = (project in file("p")).enablePlugins(PlayJava && LagomPlay)
.settings(
Expand Down
2 changes: 1 addition & 1 deletion dev/sbt-plugin/src/sbt-test/sbt-plugin/run/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode

lazy val root = (project in file(".")).enablePlugins(LagomJava)

scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")

interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.lightbend.lagom.sbt.Internal.Keys.interactionMode
interactionMode in ThisBuild := com.lightbend.lagom.sbt.NonBlockingInteractionMode

lazy val commonSettings = Seq(
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")
)

lazy val fooApi = (project in file("foo/api"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ object ScriptedTools extends AutoPlugin {
)

override def projectSettings: Seq[Setting[_]] = Seq(
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.4")
scalaVersion := sys.props.get("scala.version").getOrElse("2.12.6")
)

private def repeatUntilSuccessful[T](log: Logger, operation: => T, times: Int = 10): T = {
Expand Down
2 changes: 1 addition & 1 deletion docs/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val ScalaVersion = "2.12.4"
val ScalaVersion = "2.12.6"

val AkkaVersion = "2.5.12"
val JUnitVersion = "4.11"
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/java/guide/build/code/lagom-build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "X.Y.Z") // replace 'X
//#add-sbt-plugin

//#scala-version
scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"
//#scala-version

//#hello-api
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/java/guide/build/code/multiple-builds.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bintrayOmitLicense in ThisBuild := false
//#hello-build
organization in ThisBuild := "com.example"

scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"

lazy val `hello-api` = (project in file("hello-api"))
.settings(version := "1.0")
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/java/releases/Migration14.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ and use it when declaring dependencies, for example:
The Scala version can be updated by editing the `build.sbt` file, and updating the `scalaVersion` settings, for example:

```scala
scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"
```

## Akka HTTP as the default server engine
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/scala/guide/build/code/lagom-build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "X.Y.Z")
//#add-sbt-plugin

//#scala-version
scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"
//#scala-version

//#hello-api
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/scala/guide/build/code/multiple-builds.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bintrayOmitLicense in ThisBuild := false
//#hello-build
organization in ThisBuild := "com.example"

scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"

lazy val `hello-api` = (project in file("hello-api"))
.settings(version := "1.0")
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/scala/releases/Migration14.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Lagom is now cross compiled to Scala 2.11 and 2.12. It's recommended to upgrade
The Scala version can be updated by editing the `build.sbt` file, and updating the `scalaVersion` settings, for example:

```scala
scalaVersion in ThisBuild := "2.12.4"
scalaVersion in ThisBuild := "2.12.6"
```


Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ object Dependencies {
val AkkaVersion = "2.5.12"
val AkkaHttpVersion = "10.0.13"
// Also be sure to update ScalaVersion in docs/build.sbt.
val ScalaVersions = Seq("2.12.4", "2.11.12")
val SbtScalaVersions = Seq("2.10.6", "2.12.4")
val ScalaVersions = Seq("2.12.6", "2.11.12")
val SbtScalaVersions = Seq("2.10.6", "2.12.6")
val AkkaPersistenceCassandraVersion = "0.60"
val AkkaPersistenceJdbcVersion = "3.3.0"
// Also be sure to update ScalaTestVersion in docs/build.sbt.
Expand Down
3 changes: 1 addition & 2 deletions project/Doc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ object Unidoc extends AutoPlugin {

lazy val GenjavadocCompilerPlugin = config("genjavadocplugin") hide

override def trigger = allRequirements
override def requires = plugins.JvmPlugin
override def projectConfigurations: Seq[Configuration] = Seq(Genjavadoc)

Expand All @@ -168,7 +167,7 @@ object Unidoc extends AutoPlugin {
// down to two assuming https://github.com/typesafehub/genjavadoc/issues/66 is possible.
override lazy val projectSettings = inConfig(Genjavadoc)(Defaults.configSettings) ++ Seq(
ivyConfigurations += GenjavadocCompilerPlugin,
libraryDependencies += "com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.10" % "genjavadocplugin->default(compile)" cross CrossVersion.full,
libraryDependencies += "com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.11" % "genjavadocplugin->default(compile)" cross CrossVersion.full,
scalacOptions in Genjavadoc ++= Seq(
"-P:genjavadoc:out=" + (target.value / "java"),
"-P:genjavadoc:fabricateParams=false"
Expand Down

0 comments on commit f4195a1

Please sign in to comment.