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