title: Firebase has different versions for compile and runtime
body: <p>started today with Firebase - it seems pretty easy, but currently I'm doing something completely wrong.</p>
  
  <p>My build error: </p>
  
  <pre><code>Error:Execution failed for task ':app:preDebugBuild'. Android dependency 
  'com.google.firebase:firebase-core' has different version for the compile 
  (9.0.0) and runtime (11.2.0) classpath. You should manually set the same version via DependencyResolution```
  </code></pre>
  
  <p>with <code>apply plugin: 'com.google.gms.google-services'</code> in the base feature's <code>build.gradle</code></p>
  
  <p>Without this line there are no build errors, but, Firebase stops working (that was pretty predictable :D)</p>
  
  <p>base feature's <code>build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'com.android.feature'
  apply plugin: 'kotlin-android'
  apply plugin: 'com.google.gms.google-services'
  
  android {
      baseFeature = true
      compileSdkVersion 26
      buildToolsVersion "26.0.1"
      defaultConfig {
          minSdkVersion 17
          targetSdkVersion 26
          versionCode 35
          versionName "1.1.1"
      }
      buildTypes {
          release {
              minifyEnabled false
          }
      }
  }
  
  repositories {
      flatDir {
          dirs 'libs'
      }
      mavenCentral()
  }
  
  dependencies {
      androidTestCompile('com.android.support.test.espresso:espresso-                core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-    annotations'
      })
      testCompile 'junit:junit:4.12'
  
      compile fileTree(dir: 'libs', include: ['*.jar'])
  
      compile "com.android.support:appcompat-v7:$support_version"
      compile "com.android.support:support-v13:$support_version"
      compile "com.android.support:recyclerview-v7:$support_version"
  
      compile "com.android.support:design:$support_version"
      compile "com.android.support:customtabs:$support_version"
      compile "com.android.support:support-vector-drawable:$support_version"
  
      implementation "com.google.firebase:firebase-messaging:$firebase_version"
      implementation "com.google.firebase:firebase-database:$firebase_version"
      implementation "com.google.firebase:firebase-appindexing:$firebase_version"
      implementation "com.google.firebase:firebase-core:$firebase_version"
  
      compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  }
  </code></pre>
  
  <p>and the project's one:</p>
  
  <pre><code>buildscript {
      ext.kotlin_version = '1.1.4-3'
      ext.firebase_version = '11.2.0'
      ext.support_version = '26.0.2'
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.0.0-beta4'
          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
          classpath 'com.google.gms:google-services:3.1.0'
      }    
  }
  
  allprojects {
      repositories {
          jcenter()
          maven {
              url "https://maven.google.com"
          }
          google()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>Any help? Thanks a lot!</p>