build.gradle 3.75 KB
Newer Older
1
apply plugin: 'com.android.application'
2 3 4
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'realm-android'
apply plugin: 'com.jakewharton.hugo'
Tiago Cunha's avatar
Tiago Cunha committed
5
apply plugin: 'com.github.triplet.play'
6
apply from: '../config/quality/quality.gradle'
7

8
buildscript {
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  repositories {
    jcenter()
    mavenCentral()
  }
  dependencies {
    classpath rootProject.ext.androidPlugin

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath rootProject.ext.retroLambdaPlugin
    classpath rootProject.ext.retroLambdaPatch
    classpath rootProject.ext.realmPlugin
    classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
    classpath 'com.google.gms:google-services:3.0.0'
    classpath 'com.github.triplet.gradle:play-publisher:1.1.5'
  }

  // Exclude the version that the android plugin depends on.
  configurations.classpath.exclude group: 'com.android.tools.external.lombok'
28 29
}

30
android {
31 32 33 34 35 36
  compileSdkVersion rootProject.ext.compileSdkVersion
  buildToolsVersion rootProject.ext.buildToolsVersion
  defaultConfig {
    applicationId "chat.rocket.android"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.compileSdkVersion
Tiago Cunha's avatar
Tiago Cunha committed
37
    versionCode 3
38 39 40 41 42 43 44 45 46 47 48 49
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    vectorDrawables.useSupportLibrary = true
    multiDexEnabled true
  }
  signingConfigs {
    release {
      storeFile project.rootProject.file('Rocket.jks').getCanonicalFile()
      storePassword System.getenv("KEYSTORE_PASSWORD")
      keyAlias System.getenv("KEY_ALIAS")
      keyPassword System.getenv("KEY_PASSWORD")
50
    }
51 52 53 54 55 56
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      signingConfig signingConfigs.release
57
    }
58 59 60 61
  }
  productFlavors {
    qa {
      // something - qa builds will have some extra stuff for alpha testers
Yusuke Iwaki's avatar
Yusuke Iwaki committed
62
    }
63 64
    prod {
      // another
Tiago Cunha's avatar
Tiago Cunha committed
65
    }
66 67 68 69 70 71 72 73 74 75 76 77 78
  }
  packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
  }
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
  lintOptions {
    //avoiding okio error: https://github.com/square/okhttp/issues/896
    lintConfig file("lint.xml")
  }
79
}
Tiago Cunha's avatar
Tiago Cunha committed
80
play {
81 82
  jsonFile = file('rocket-chat.json')
  track = "${track}"
Tiago Cunha's avatar
Tiago Cunha committed
83
}
84 85

repositories {
86 87 88 89
  mavenCentral()
  maven { url 'https://github.com/lijingle1/stetho-realm/raw/master/maven-repo' }
  maven { url 'http://dl.bintray.com/amulyakhare/maven' }
  maven { url "https://clojars.org/repo/" } //for icepick.
90 91 92
}

dependencies {
93 94 95 96 97 98 99 100 101 102 103
  compile project(':log-wrapper')
  compile project(':android-ddp')
  compile project(':rocket-chat-android-widgets')
  compile project(':realm-helpers')
  compile rootProject.ext.supportAppCompat
  compile rootProject.ext.supportDesign

  qaCompile('com.instabug.library:instabug:3.1.0') {
    exclude group: 'io.reactivex'
  }
  compile 'com.android.support:multidex:1.0.1'
Yusuke Iwaki's avatar
Yusuke Iwaki committed
104

105 106
  compile 'com.google.firebase:firebase-core:10.0.0'
  compile 'com.google.firebase:firebase-crash:10.0.0'
107

108 109
  compile rootProject.ext.okhttp3
  compile rootProject.ext.picasso
110

111 112 113
  compile 'com.facebook.stetho:stetho:1.4.1'
  compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
  compile 'com.uphyca:stetho_realm:2.0.1'
114

115 116
  compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'
  compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.4.0'
Yusuke Iwaki's avatar
Yusuke Iwaki committed
117

118 119 120
  compile 'com.trello:rxlifecycle:1.0'
  compile 'com.trello:rxlifecycle-android:1.0'
  compile 'com.trello:rxlifecycle-components:1.0'
121

122
  compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
Yusuke Iwaki's avatar
Yusuke Iwaki committed
123

124 125
  compile 'frankiesardo:icepick:3.2.0'
  provided 'frankiesardo:icepick-processor:3.2.0'
126
}
127 128

apply plugin: 'com.google.gms.google-services'