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:10.2.6'
 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.12@aar'
 39    compile 'com.kyleduo.switchbutton:library:1.2.8'
 40    compile 'org.whispersystems:signal-protocol-java:2.5.3'
 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}
 45
 46ext {
 47    travisBuild = System.getenv("TRAVIS") == "true"
 48    // allows for -Dpre-dex=false to be set
 49    preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
 50}
 51
 52android {
 53    compileSdkVersion 25
 54    buildToolsVersion "25.0.3"
 55
 56    defaultConfig {
 57        minSdkVersion 14
 58        targetSdkVersion 25
 59        versionCode 228
 60        versionName "1.19.5"
 61        archivesBaseName += "-$versionName"
 62        applicationId "eu.siacs.conversations"
 63    }
 64
 65    dexOptions {
 66        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
 67        preDexLibraries = preDexEnabled && !travisBuild
 68    }
 69
 70    compileOptions {
 71        sourceCompatibility JavaVersion.VERSION_1_7
 72        targetCompatibility JavaVersion.VERSION_1_7
 73    }
 74
 75    productFlavors {
 76        playstore
 77        free
 78    }
 79    if (project.hasProperty('mStoreFile') &&
 80            project.hasProperty('mStorePassword') &&
 81            project.hasProperty('mKeyAlias') &&
 82            project.hasProperty('mKeyPassword')) {
 83        signingConfigs {
 84            release {
 85                storeFile file(mStoreFile)
 86                storePassword mStorePassword
 87                keyAlias mKeyAlias
 88                keyPassword mKeyPassword
 89            }
 90        }
 91        buildTypes.release.signingConfig = signingConfigs.release
 92    } else {
 93        buildTypes.release.signingConfig = null
 94    }
 95
 96    lintOptions {
 97        disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
 98    }
 99
100    subprojects {
101
102        afterEvaluate {
103            if (getPlugins().hasPlugin('android') ||
104                    getPlugins().hasPlugin('android-library')) {
105
106                configure(android.lintOptions) {
107                    disable 'AndroidGradlePluginVersion', 'MissingTranslation'
108                }
109            }
110
111        }
112    }
113
114    packagingOptions {
115        exclude 'META-INF/BCKEY.DSA'
116        exclude 'META-INF/BCKEY.SF'
117    }
118}