build.gradle

  1// Top-level build file where you can add configuration options common to all
  2// sub-projects/modules.
  3buildscript {
  4    repositories {
  5        jcenter()
  6        mavenCentral()
  7    }
  8    dependencies {
  9        classpath 'com.android.tools.build:gradle:2.3.0'
 10    }
 11}
 12
 13apply plugin: 'com.android.application'
 14
 15repositories {
 16    jcenter()
 17    mavenCentral()
 18}
 19
 20configurations {
 21    playstoreCompile
 22}
 23
 24dependencies {
 25    compile project(':libs:MemorizingTrustManager')
 26    playstoreCompile 'com.google.android.gms:play-services-gcm:11.0.2'
 27    compile 'org.sufficientlysecure:openpgp-api:10.0'
 28    compile 'com.soundcloud.android:android-crop:1.0.1@aar'
 29    compile 'com.android.support:support-v13:25.3.1'
 30    compile 'org.bouncycastle:bcprov-jdk15on:1.52'
 31    compile 'org.bouncycastle:bcmail-jdk15on:1.52'
 32    compile 'org.jitsi:org.otr4j:0.22'
 33    compile 'org.gnu.inet:libidn:1.15'
 34    compile 'com.google.zxing:core:3.2.1'
 35    compile 'com.google.zxing:android-integration:3.2.1'
 36    compile 'de.measite.minidns:minidns-hla:0.2.1'
 37    compile 'de.timroes.android:EnhancedListView:0.3.4'
 38    compile 'me.leolin:ShortcutBadger:1.1.17@aar'
 39    compile 'com.kyleduo.switchbutton:library:1.2.8'
 40    compile 'org.whispersystems:signal-protocol-java:2.6.2'
 41    compile 'com.makeramen:roundedimageview:2.2.0'
 42    compile "com.wefika:flowlayout:0.4.1"
 43    compile 'net.ypresto.androidtranscoder:android-transcoder:0.2.0'
 44    compile ('com.vdurmont:emoji-java:3.3.0') {
 45        exclude group: 'org.json', module: 'json'
 46    }
 47}
 48
 49ext {
 50    travisBuild = System.getenv("TRAVIS") == "true"
 51    // allows for -Dpre-dex=false to be set
 52    preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
 53}
 54
 55android {
 56    compileSdkVersion 25
 57    buildToolsVersion "25.0.3"
 58
 59    defaultConfig {
 60        minSdkVersion 14
 61        targetSdkVersion 25
 62        versionCode 228
 63        versionName "1.19.5"
 64        archivesBaseName += "-$versionName"
 65        applicationId "eu.siacs.conversations"
 66    }
 67
 68    dexOptions {
 69        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
 70        preDexLibraries = preDexEnabled && !travisBuild
 71    }
 72
 73    compileOptions {
 74        sourceCompatibility JavaVersion.VERSION_1_7
 75        targetCompatibility JavaVersion.VERSION_1_7
 76    }
 77
 78    productFlavors {
 79        playstore
 80        free
 81    }
 82    if (project.hasProperty('mStoreFile') &&
 83            project.hasProperty('mStorePassword') &&
 84            project.hasProperty('mKeyAlias') &&
 85            project.hasProperty('mKeyPassword')) {
 86        signingConfigs {
 87            release {
 88                storeFile file(mStoreFile)
 89                storePassword mStorePassword
 90                keyAlias mKeyAlias
 91                keyPassword mKeyPassword
 92            }
 93        }
 94        buildTypes.release.signingConfig = signingConfigs.release
 95    } else {
 96        buildTypes.release.signingConfig = null
 97    }
 98
 99    lintOptions {
100        disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
101    }
102
103    subprojects {
104
105        afterEvaluate {
106            if (getPlugins().hasPlugin('android') ||
107                    getPlugins().hasPlugin('android-library')) {
108
109                configure(android.lintOptions) {
110                    disable 'AndroidGradlePluginVersion', 'MissingTranslation'
111                }
112            }
113
114        }
115    }
116
117    packagingOptions {
118        exclude 'META-INF/BCKEY.DSA'
119        exclude 'META-INF/BCKEY.SF'
120    }
121}