Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.jetbrains.kotlin.config.KotlinCompilerVersion
- import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
- plugins {
- id("com.android.application")
- kotlin("android")
- kotlin("android.extensions")
- kotlin("kapt")
- id("realm-android")
- id("com.google.gms.google-services")
- }
- val VERSION_NAME: String by project
- val VERSION_CODE: String by project
- val buildRelease = "release"
- val buildDebug = "debug"
- android {
- compileSdkVersion(28)
- defaultConfig {
- applicationId = "com.domain.app"
- minSdkVersion(21)
- targetSdkVersion(28)
- versionCode = VERSION_CODE.toInt()
- versionName = VERSION_NAME
- vectorDrawables.useSupportLibrary = true
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- getByName(buildRelease) {
- isMinifyEnabled = true
- proguardFiles(
- getDefaultProguardFile("proguard-android.txt"),
- "proguard-rules.pro")
- signingConfig = signingConfigs.getByName(buildRelease)
- }
- getByName(buildDebug) {
- isMinifyEnabled = false
- isTestCoverageEnabled = true
- applicationIdSuffix = ".debug"
- }
- val dimensionDefault = "default"
- val flavorMock = "mock"
- val flavorProd = "prod"
- flavorDimensions(dimensionDefault)
- productFlavors {
- create(flavorMock) {
- setDimension(dimensionDefault)
- applicationIdSuffix = ".mock"
- }
- create(flavorProd) {
- setDimension(dimensionDefault)
- }
- }
- // Remove mockRelease as it's not needed.
- variantFilter {
- if (buildType.name == buildRelease
- && flavors[0].name == flavorMock) {
- setIgnore(true)
- }
- }
- }
- compileOptions {
- targetCompatibility = JavaVersion.VERSION_1_8
- sourceCompatibility = JavaVersion.VERSION_1_8
- (kotlinOptions as KotlinJvmOptions).jvmTarget = "1.8"
- }
- }
- dependencies {
- implementation(fileTree("libs") { include("*.jar") })
- implementation(kotlin("stdlib-jdk7", KotlinCompilerVersion.VERSION))
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1")
- // region libraries
- implementation("androidx.appcompat:appcompat:1.0.2")
- implementation("androidx.recyclerview:recyclerview:1.0.0")
- implementation("com.google.android.material:material:1.0.0")
- implementation("androidx.constraintlayout:constraintlayout:1.1.3")
- implementation("io.realm:android-adapters:2.1.0")
- implementation("com.google.android.gms:play-services-maps:16.0.0")
- implementation("com.google.android.gms:play-services-location:16.0.0")
- implementation("com.google.maps.android:android-maps-utils:0.5")
- kapt("com.google.firebase:firebase-core:16.0.6")
- implementation("com.google.firebase:firebase-messaging:17.3.4")
- implementation("com.bluelinelabs:conductor:2.1.5")
- implementation("com.facebook.fresco:fresco:1.10.0")
- implementation("io.reactivex:rxjava:1.3.8")
- implementation("io.reactivex:rxandroid:1.2.1")
- implementation("com.jakewharton.rxrelay:rxrelay:1.2.0")
- implementation("com.jakewharton:butterknife:10.0.0")
- kapt("com.jakewharton:butterknife-compiler:10.0.0")
- kapt("com.google.dagger:dagger-compiler:2.17")
- implementation("com.google.dagger:dagger:2.17")
- implementation("com.squareup.okhttp3:logging-interceptor:3.11.0")
- implementation("com.splunk:mint-android-hook-okhttp:5.2.5")
- implementation("com.squareup.retrofit2:retrofit:2.5.0")
- implementation("com.squareup.retrofit2:adapter-rxjava:2.5.0")
- implementation("com.squareup.retrofit2:converter-gson:2.4.0")
- implementation("com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2")
- implementation("net.danlew:android.joda:2.9.9")
- implementation("com.jakewharton.timber:timber:4.7.1")
- implementation("com.github.PhilJay:MPAndroidChart:v3.1.0-alpha")
- // endregion
- // region testing
- testImplementation(kotlin("test", KotlinCompilerVersion.VERSION))
- testImplementation(kotlin("reflect", KotlinCompilerVersion.VERSION))
- testImplementation("junit:junit:4.12")
- "mockImplementation"("com.squareup.retrofit2:retrofit-mock:2.2.0") {
- exclude("com.squareup.okio", "okio")
- exclude("com.squareup.okhttp3", "okhttp")
- }
- testImplementation("org.mockito:mockito-core:2.23.0")
- testImplementation("com.nhaarman:mockito-kotlin-kt1.1:1.6.0")
- testImplementation("joda-time:joda-time:2.10")
- "mockImplementation"("androidx.test.espresso:espresso-idling-resource:3.1.1")
- androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
- androidTestImplementation("androidx.test.espresso:espresso-intents:3.1.1")
- androidTestImplementation("androidx.test:runner:1.1.1")
- androidTestImplementation("androidx.test.espresso:espresso-core:3.1.0-beta02") {
- // exclude "support-annotations"
- }
- androidTestImplementation("androidx.test.espresso:espresso-contrib:3.1.0-beta02") {
- // exclude "support-annotations"
- exclude("com.android.support", "appcompat")
- exclude("com.android.support", "support-v4")
- exclude("com.android.support", "support-v13")
- // exclude "recyclerview-v13"
- }
- // endregion
- }
Advertisement
Add Comment
Please, Sign In to add comment