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