title: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'
body: <p>This is the error I'm getting when I try to build my project, Please help me to solves this I'm stuck at this and I'm a beginner in android.</p>
  
  <blockquote>
    <p>Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: <a href="http://d.android.com/r/tools/update-dependency-configurations.html" rel="nofollow noreferrer">http://d.android.com/r/tools/update-dependency-configurations.html</a></p>
  </blockquote>
  
  <p>I'm also attaching my app level and build level gradle files.</p>
  
  <p><strong>App level buld.gradle</strong></p>
  
  <pre><code>buildscript {
      repositories { maven { url 'https://maven.fabric.io/public' } }
      dependencies { classpath 'io.fabric.tools:gradle:1.25.3' }
  }
  plugins {
      id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
  }
  apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
  repositories {
      maven { url 'https://maven.google.com' }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  repositories { maven { url 'https://maven.fabric.io/public' } }
  android {
      compileSdkVersion 27
      useLibrary 'org.apache.http.legacy'
      defaultConfig {
  
          minSdkVersion 19
          targetSdkVersion 27
          versionCode 102
          versionName "1.0.2"
          multiDexEnabled true
  //        resConfigs "en"
          manifestPlaceholders = [onesignal_app "code",
                                  // Live
                                  onesignal_google_project_number: "REMOTE"]
  
  ////
  //        manifestPlaceholders = [onesignal_app_id               : "b35433d4-be61-473f-94f8-65364b2cd501",
  //                                // Internal Testing
  //                                onesignal_google_project_number: "REMOTE"]
      }
      android {
          lintOptions {
              checkReleaseBuilds false
              abortOnError false
          }
      }
      android {
          buildTypes {
              packagingOptions {
                  exclude 'META-INF/NOTICE' // will not include NOTICE file
                  exclude 'META-INF/LICENSE' // will not include LICENSE file
                  // as noted by @Vishnuvathsan you may also need to include
                  // variations on the file name. It depends on your dependencies.
                  // Some other common variations on notice and license file names
                  exclude 'META-INF/notice'
                  exclude 'META-INF/notice.txt'
                  exclude 'META-INF/license'
                  exclude 'META-INF/license.txt'
              }
              debug {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              }
              release {
                  debuggable false
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                  consumerProguardFiles 'proguard-file.pro'
              }
          }
      }
      dexOptions {
          preDexLibraries = false
          javaMaxHeapSize "12g"
      }
  }
  repositories
          {
              maven { url 'https://repo.commonsware.com.s3.amazonaws.com' }
              maven { url 'https://jitpack.io' }
              maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
          }
  //configurations.all {
  //    resolutionStrategy {
  //        force 'com.android.support:design:23.4.0'
  ////        force 'com.android.support:support-v4:23.4.0'
  //        force 'com.android.support:appcompat-v7:23.4.0'
  //    }
  //}
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:recyclerview-v7:27.1.1'
      implementation 'com.android.support:cardview-v7:27.1.1'
  //    implementation 'com.helpshift:android-aar:3.7.2'
      implementation 'com.mcxiaoke.volley:library:1.0.19'
      implementation files('libs/universal-image-loader-1.6.1-with-src.jar')
      implementation project(':library')
      implementation files('libs/Parse-1.8.0.jar')
      implementation project(':gallery')
      implementation project(':indicator')
      implementation 'com.amplitude:android-sdk:2.9.2'
      implementation 'com.razorpay:checkout:1.4.1'
      implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
          transitive = true;
      }
  //    implementation 'com.hokolinks:hoko:2.3.0'
      implementation 'cat.ereza:customactivityoncrash:1.5.0'
      implementation 'com.android.support:multidex:1.0.3'
      implementation 'com.android.support:design:27.1.1'
      implementation 'com.google.android.gms:play-services-auth:15.0.1'
      implementation 'com.google.android.gms:play-services-base:15.0.1'
      implementation 'com.google.firebase:firebase-appindexing:15.0.1'
      implementation 'com.google.android.gms:play-services-appinvite:16.0.0'
      implementation 'com.google.android.gms:play-services-gcm:15.0.1'
      implementation 'com.google.android.gms:play-services-location:15.0.1'
      implementation 'com.google.android.gms:play-services-plus:15.0.1'
      implementation 'com.google.android.gms:play-services-maps:15.0.1'
      implementation 'com.github.jaydeepw:poly-picker:v1.0.22'
      implementation 'com.github.Commit451:NativeStackBlur:1.0.2'
      implementation 'com.github.Hitta:RippleEffect:82cf00e551'
      implementation 'com.github.zplesac:android_connectionbuddy:v1.0.7'
      implementation 'com.github.paolorotolo:expandableheightlistview:1.0.0'
      implementation 'com.github.tony19:timber-loggly:1.0.1'
      implementation 'com.neumob:neumob-android:3.7.2'
      implementation 'com.facebook.fresco:fresco:1.8.0'
      implementation 'com.firebase:firebase-client-android:2.5.2'
      implementation 'com.google.android.exoplayer:exoplayer:r1.5.10'
      implementation project(':common')
      implementation project(':commonwidget')
      implementation project(':videowidget')
      implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
      implementation project(':Spotlight-library')
      implementation 'com.onesignal:OneSignal:3.9.1@aar'
      implementation files('libs/YouTubeAndroidPlayerApi.jar')
      implementation files('libs/dropbox-android-sdk-1.6.3.jar')
      implementation 'com.pitt.fresh.library:freshdownloadview:1.0'
      implementation 'es.voghdev.pdfviewpager:library:1.0.1'
      implementation('com.crashlytics.sdk.android:answers:1.3.11@aar') {
          transitive = true;
      }
  //    implementation 'com.bugsee:bugsee-android:+'
      implementation 'com.stripe:stripe-android:5.0.0'
      implementation 'com.google.firebase:firebase-core:16.0.0'
      implementation 'com.google.firebase:firebase-perf:16.0.0'
      implementation 'io.branch.sdk.android:library:2.18.1'
      implementation project(path: ':androidQuery')
      implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
      implementation 'com.instabug.library:instabug:4.11.0'
      implementation ('io.branch.sdk.android:library:2.+') {
          exclude module: 'answers-shim'
      }
  }
  apply plugin: 'com.google.gms.google-services'
  apply plugin: 'com.google.firebase.firebase-perf'
  </code></pre>
  
  <p><strong>Project level buld.gradle</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  buildscript {
      repositories {
          jcenter()
          google()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.2'
          classpath 'com.google.gms:google-services:3.2.0'
          classpath 'com.google.firebase:firebase-plugins:1.1.1'
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  allprojects {
      repositories {
          jcenter()
          google()
          maven {
              url "https://maven.google.com" // Google's Maven repository
          }
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jN0yX.png" rel="nofollow noreferrer">error screenshot</a></p>
  
  <p><strong>error</strong></p>
  
  <p>Host name 'repo.commonsware.com.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)</p>