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