Advertisement
Guest User

Untitled

a guest
Nov 15th, 2017
943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 7.22 KB | None | 0 0
  1. apply plugin: 'com.android.application'    
  2.     apply plugin: 'kotlin-android'
  3.     apply plugin: 'kotlin-android-extensions'
  4.    
  5.     def keystorePropertiesFile = rootProject.file("./signing.properties");
  6.     def keystoreProperties = new Properties()
  7.     keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  8.    
  9.     android {
  10.         compileSdkVersion rootProject.ext.compileSdkVersion
  11.         buildToolsVersion rootProject.ext.buildToolsVersion
  12.    
  13.         defaultConfig {
  14.             applicationId "com.jm.joinmamas"
  15.             minSdkVersion rootProject.ext.minSdkVersion
  16.             targetSdkVersion rootProject.ext.targetSdkVersion
  17.             versionCode rootProject.ext.versionCode
  18.             versionName rootProject.ext.versionName
  19.             buildConfigField "long", "API_VERSION", "1"
  20.         }
  21.         signingConfigs {
  22.             releaseCI {
  23.                 storeFile file(keystoreProperties['RELEASE_STORE_FILE'])
  24.                 storePassword keystoreProperties['RELEASE_STORE_PASSWORD']
  25.                 keyAlias keystoreProperties['RELEASE_KEY_ALIAS']
  26.                 keyPassword keystoreProperties['RELEASE_KEY_PASSWORD']
  27.             }
  28.             release {
  29.                 storeFile file(keystoreProperties['RELEASE_STORE_FILE'])
  30.                 storePassword keystoreProperties['RELEASE_STORE_PASSWORD']
  31.                 keyAlias keystoreProperties['RELEASE_KEY_ALIAS']
  32.                 keyPassword keystoreProperties['RELEASE_KEY_PASSWORD']
  33.             }
  34.             debug {
  35.                 storeFile file('./../debug.keystore')
  36.             }
  37.         }
  38.    
  39.         def isGitLabCI = System.getenv().containsKey('CI')
  40.    
  41.         buildTypes {
  42.             release {
  43.                 debuggable false
  44.                 minifyEnabled true
  45.                 shrinkResources true
  46.                 proguardFiles getDefaultProguardFile('proguard-android.txt')
  47.                 proguardFile 'proguard-libs.pro'
  48.                 proguardFile 'proguard-android.pro'
  49.                 proguardFile 'proguard-common.pro'
  50.                 proguardFile 'proguard-rules-release.pro'
  51.                 signingConfig signingConfigs.release
  52.                 if (isGitLabCI) {
  53.                     signingConfig signingConfigs.releaseCI
  54.                 }
  55.             }
  56.             debug {
  57.                 debuggable true
  58.                 minifyEnabled true
  59.                 shrinkResources true
  60.                 proguardFiles getDefaultProguardFile('proguard-android.txt')
  61.                 proguardFile 'proguard-libs.pro'
  62.                 proguardFile 'proguard-android.pro'
  63.                 proguardFile 'proguard-common.pro'
  64.                 proguardFile 'proguard-jm.pro'
  65.                 proguardFile 'proguard-rules-debug.pro'
  66.             }
  67.         }
  68.    
  69.         productFlavors {
  70.             prod {
  71.                 applicationId = "com.jm.joinmamas"
  72.             }
  73.             dev {
  74.                 applicationId = "com.jm.joinmamas.dev"
  75.             }
  76.         }
  77.    
  78.         flavorDimensions "default"
  79.    
  80.         compileOptions {
  81.             sourceCompatibility JavaVersion.VERSION_1_8
  82.             targetCompatibility JavaVersion.VERSION_1_8
  83.         }
  84.    
  85.         lintOptions {
  86.             checkReleaseBuilds false
  87.             abortOnError false
  88.             disable 'InvalidPackage', 'SpUsage'
  89.         }
  90.    
  91.         defaultConfig {
  92.             resConfigs "en", "de", "ru"
  93.         }
  94.    
  95.         kapt {
  96.             generateStubs = true
  97.         }
  98.     }
  99.    
  100.     dependencies {
  101.         implementation fileTree(dir: 'libs', include: ['*.jar'])
  102.    
  103.         // RxMvp
  104.         implementation project(':rxmvp-core')
  105.         implementation project(':dialog-lib')
  106.         implementation project(':rxmvp-api')
  107.         kapt project(':rxmvp-processor')
  108.    
  109.         // Support
  110.         implementation "com.android.support:appcompat-v7:$support"
  111.         implementation "com.android.support:design:$support"
  112.         implementation "com.android.support:support-v4:$support"
  113.         implementation "com.android.support:support-annotations:$support"
  114.         implementation "com.android.support:percent:$support"
  115.         implementation "com.android.support:cardview-v7:$support"
  116.         implementation "com.android.support:customtabs:$support"
  117.    
  118.         // Location
  119.         implementation "com.google.android.gms:play-services-maps:$googleServices"
  120.         implementation "com.google.android.gms:play-services-location:$googleServices"
  121.         implementation "com.google.maps.android:android-maps-utils:$mapUtils"
  122.    
  123.         // Analytics
  124.         implementation "com.google.firebase:firebase-messaging:$googleServices"
  125.         implementation "com.google.android.gms:play-services-analytics:$googleServices"
  126.    
  127.         // Auth
  128.         implementation "com.facebook.android:facebook-android-sdk:$facebook"
  129.         implementation "com.vk:androidsdk:$vk"
  130.    
  131.         // Stream API
  132.         implementation "com.annimon:stream:$streamApi"
  133.    
  134.         // Retrofit
  135.         implementation "com.squareup.retrofit2:retrofit:$retrofit"
  136.         implementation "com.squareup.retrofit2:converter-gson:$retrofit"
  137.         implementation "com.squareup.retrofit2:adapter-rxjava:$retrofit"
  138.         implementation "com.squareup.okhttp3:logging-interceptor:3.8.1"
  139.    
  140.         // Rx
  141.         implementation "io.reactivex:rxandroid:$rxAndroid"
  142.         implementation "io.reactivex:rxjava:$rxJava"
  143.         implementation "com.jakewharton.rxbinding:rxbinding:$rxBinding"
  144.         implementation "com.github.VictorAlbertos:RxActivityResult:0.3.4"
  145.    
  146.         // Permissions
  147.         implementation "com.tbruyelle.rxpermissions:rxpermissions:0.9.1@aar"
  148.    
  149.         // Dagger 2
  150.         implementation "com.google.dagger:dagger:$dagger"
  151.         kapt "com.google.dagger:dagger-compiler:$dagger"
  152.         compileOnly "org.glassfish:javax.annotation:10.0-b28"
  153.    
  154.         // Butterknife
  155.         implementation "com.google.code.gson:gson:$gson"
  156.         implementation "com.jakewharton:butterknife:$butterKnife"
  157.         kapt "com.jakewharton:butterknife-compiler:$butterKnife"
  158.    
  159.         // Ui stuff
  160.         implementation "com.jakewharton.picasso:picasso2-okhttp3-downloader:$picasso"
  161.         implementation "com.google.android:flexbox:$flexbox"
  162.         implementation "com.roughike:bottom-bar:2.0.2"
  163.         implementation "com.commit451:PhotoView:1.2.5"
  164.         implementation "uk.co.chrisje
  165.    
  166.        // Testing
  167.        testImplementation('org.powermock:powermock-api-mockito2:1.6.5') {
  168.            exclude module: 'hamcrest-core'
  169.            exclude module: 'objenesis'
  170.        }
  171.        testImplementation('org.powermock:powermock-module-junit4:1.6.5') {
  172.            exclude module: 'hamcrest-core'
  173.            exclude module: 'objenesis'
  174.        }
  175.        testImplementation 'org.mockito:mockito-core:2.0.42-beta' // 2.2.7
  176.        testImplementation "junit:junit:4.12"
  177.    
  178.        // todo devImplementation only
  179.        implementation "com.facebook.stetho:stetho:$stethoVersion"
  180.        implementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"
  181.    
  182.        // Kotlin
  183.        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  184.    }
  185.    
  186.    // For Firebase
  187.    apply plugin: 'com.google.gms.google-services'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement