Guest User

Untitled

a guest
Apr 23rd, 2019
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 5.49 KB | None | 0 0
  1. import org.jetbrains.kotlin.config.KotlinCompilerVersion
  2. import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
  3.  
  4. plugins {
  5.     id("com.android.application")
  6.     kotlin("android")
  7.     kotlin("android.extensions")
  8.     kotlin("kapt")
  9.     id("realm-android")
  10.     id("com.google.gms.google-services")
  11. }
  12.  
  13. val VERSION_NAME: String by project
  14. val VERSION_CODE: String by project
  15.  
  16. val buildRelease = "release"
  17. val buildDebug = "debug"
  18. android {
  19.     compileSdkVersion(28)
  20.     defaultConfig {
  21.         applicationId = "com.domain.app"
  22.         minSdkVersion(21)
  23.         targetSdkVersion(28)
  24.         versionCode = VERSION_CODE.toInt()
  25.         versionName = VERSION_NAME
  26.  
  27.         vectorDrawables.useSupportLibrary = true
  28.  
  29.         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  30.     }
  31.  
  32.     buildTypes {
  33.         getByName(buildRelease) {
  34.             isMinifyEnabled = true
  35.             proguardFiles(
  36.                     getDefaultProguardFile("proguard-android.txt"),
  37.                     "proguard-rules.pro")
  38.             signingConfig = signingConfigs.getByName(buildRelease)
  39.         }
  40.         getByName(buildDebug) {
  41.             isMinifyEnabled = false
  42.             isTestCoverageEnabled = true
  43.             applicationIdSuffix = ".debug"
  44.         }
  45.  
  46.         val dimensionDefault = "default"
  47.         val flavorMock = "mock"
  48.         val flavorProd = "prod"
  49.         flavorDimensions(dimensionDefault)
  50.         productFlavors {
  51.             create(flavorMock) {
  52.                 setDimension(dimensionDefault)
  53.                 applicationIdSuffix = ".mock"
  54.             }
  55.             create(flavorProd) {
  56.                 setDimension(dimensionDefault)
  57.             }
  58.         }
  59.  
  60.         // Remove mockRelease as it's not needed.
  61.         variantFilter {
  62.             if (buildType.name == buildRelease
  63.                     && flavors[0].name == flavorMock) {
  64.                 setIgnore(true)
  65.             }
  66.         }
  67.     }
  68.  
  69.     compileOptions {
  70.         targetCompatibility = JavaVersion.VERSION_1_8
  71.         sourceCompatibility = JavaVersion.VERSION_1_8
  72.         (kotlinOptions as KotlinJvmOptions).jvmTarget = "1.8"
  73.     }
  74.  
  75. }
  76.  
  77. dependencies {
  78.     implementation(fileTree("libs") { include("*.jar") })
  79.  
  80.     implementation(kotlin("stdlib-jdk7", KotlinCompilerVersion.VERSION))
  81.     implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1")
  82.  
  83.     // region libraries
  84.     implementation("androidx.appcompat:appcompat:1.0.2")
  85.     implementation("androidx.recyclerview:recyclerview:1.0.0")
  86.     implementation("com.google.android.material:material:1.0.0")
  87.     implementation("androidx.constraintlayout:constraintlayout:1.1.3")
  88.  
  89.     implementation("io.realm:android-adapters:2.1.0")
  90.  
  91.     implementation("com.google.android.gms:play-services-maps:16.0.0")
  92.     implementation("com.google.android.gms:play-services-location:16.0.0")
  93.     implementation("com.google.maps.android:android-maps-utils:0.5")
  94.     kapt("com.google.firebase:firebase-core:16.0.6")
  95.     implementation("com.google.firebase:firebase-messaging:17.3.4")
  96.  
  97.     implementation("com.bluelinelabs:conductor:2.1.5")
  98.  
  99.     implementation("com.facebook.fresco:fresco:1.10.0")
  100.  
  101.     implementation("io.reactivex:rxjava:1.3.8")
  102.     implementation("io.reactivex:rxandroid:1.2.1")
  103.     implementation("com.jakewharton.rxrelay:rxrelay:1.2.0")
  104.  
  105.     implementation("com.jakewharton:butterknife:10.0.0")
  106.     kapt("com.jakewharton:butterknife-compiler:10.0.0")
  107.  
  108.     kapt("com.google.dagger:dagger-compiler:2.17")
  109.     implementation("com.google.dagger:dagger:2.17")
  110.  
  111.     implementation("com.squareup.okhttp3:logging-interceptor:3.11.0")
  112.     implementation("com.splunk:mint-android-hook-okhttp:5.2.5")
  113.     implementation("com.squareup.retrofit2:retrofit:2.5.0")
  114.     implementation("com.squareup.retrofit2:adapter-rxjava:2.5.0")
  115.     implementation("com.squareup.retrofit2:converter-gson:2.4.0")
  116.     implementation("com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2")
  117.  
  118.     implementation("net.danlew:android.joda:2.9.9")
  119.     implementation("com.jakewharton.timber:timber:4.7.1")
  120.     implementation("com.github.PhilJay:MPAndroidChart:v3.1.0-alpha")
  121.     // endregion
  122.  
  123.     // region testing
  124.     testImplementation(kotlin("test", KotlinCompilerVersion.VERSION))
  125.     testImplementation(kotlin("reflect", KotlinCompilerVersion.VERSION))
  126.  
  127.     testImplementation("junit:junit:4.12")
  128.  
  129.     "mockImplementation"("com.squareup.retrofit2:retrofit-mock:2.2.0") {
  130.         exclude("com.squareup.okio", "okio")
  131.         exclude("com.squareup.okhttp3", "okhttp")
  132.     }
  133.     testImplementation("org.mockito:mockito-core:2.23.0")
  134.     testImplementation("com.nhaarman:mockito-kotlin-kt1.1:1.6.0")
  135.     testImplementation("joda-time:joda-time:2.10")
  136.  
  137.     "mockImplementation"("androidx.test.espresso:espresso-idling-resource:3.1.1")
  138.     androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
  139.     androidTestImplementation("androidx.test.espresso:espresso-intents:3.1.1")
  140.     androidTestImplementation("androidx.test:runner:1.1.1")
  141.     androidTestImplementation("androidx.test.espresso:espresso-core:3.1.0-beta02") {
  142.         //        exclude "support-annotations"
  143.     }
  144.     androidTestImplementation("androidx.test.espresso:espresso-contrib:3.1.0-beta02") {
  145.         //        exclude "support-annotations"
  146.         exclude("com.android.support", "appcompat")
  147.         exclude("com.android.support", "support-v4")
  148.         exclude("com.android.support", "support-v13")
  149. //        exclude "recyclerview-v13"
  150.     }
  151.     // endregion
  152. }
Advertisement
Add Comment
Please, Sign In to add comment