title: How to make scala 2.12.11 code run in scala 2.13.2?
body: <p>Currently in my <code>BuildSettings.scala</code> file I am using <code>crossScalaVersion := Seq(&quot;2.12.11&quot;, &quot;2.13.2&quot;)</code>, and my <code>scalaVersion := &quot;2.13.2&quot;</code>, Now when I do sbt compile, it compiles with <code>2.13.2</code> correctly without any issue. Now when I do <code>+ compile</code>, first it compiles with <code>2.12.11</code>, then with <code>2.13.2</code> and fails here. Now the reason why its failing with <code>2.13.2</code> on <code>+ compile</code> is because I have some collection libraries and  some other libraries which are supported in only <code>2.12.11</code> and not in <code>2.13.2</code>, e.g if we look at this piece of code:</p>
  <pre><code>package com.abc.models.common.implicits
  import scala.collection.TraversableLike
  trait TraversableExtension {
    implicit class traversableExtension[A, B](iterable: TraversableLike[A, B]) {
      def headOrError(message: String): A = {
        iterable.headOption.getOrElse(throw new Exception(message))
      }
    }
  }
  </code></pre>
  <p><code>TraversableLike</code> doesn't exist anymore in <code>2.13.2</code>, also in some other files I face other issues for which classes are not supported in <code>2.13.2</code> anymore.
  I can update the code according to  <code>2.13.2</code> standards and support libraries, whatever is alternative to above collection etc. But then <code>+ compile</code> fails, i.e compilation with <code>2.12.11</code> fails, as those libraries won't exist in <code>2.12.11</code>.</p>
  <p>How can I make it work with both the versions?</p>