title: How to use different kotlin library versions in each android module?
body: <p>A project has multiple modules, two of which are named :app and :prefs.</p>
  <p>The project build.gradle,</p>
  <pre><code>classpath 'com.android.tools.build:gradle:4.1.3'
  classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21&quot;
  </code></pre>
  <p>and :app build.gradle,</p>
  <pre><code>implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3&quot;
  implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3&quot;
  ...
  implementation project(&quot;:prefs&quot;)
  </code></pre>
  <p>work fine. However, the :prefs library requires the latest coroutine features,</p>
  <pre><code>implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0&quot;
  implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0&quot;
  </code></pre>
  <p>but the following error occurs:</p>
  <pre><code>jetified-kotlinx-coroutines-android-1.6.0.jar!/META-INF/kotlinx-coroutines-android.kotlin_module:
  Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.13.
  </code></pre>
  <p>Is it possible to have separate versions of the same dependency ... one in each module?</p>