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:1.3.1'
 10	}
 11}
 12
 13allprojects {
 14	repositories {
 15		jcenter()
 16		mavenCentral()
 17	}
 18}
 19
 20apply plugin: 'com.android.application'
 21
 22repositories {
 23	jcenter()
 24	mavenCentral()
 25}
 26
 27dependencies {
 28	compile project(':libs:MemorizingTrustManager')
 29	compile 'org.sufficientlysecure:openpgp-api:9.0'
 30	compile 'com.android.support:support-v13:23.0.1'
 31	compile 'org.bouncycastle:bcprov-jdk15on:1.52'
 32	compile 'org.bouncycastle:bcmail-jdk15on:1.52'
 33	compile 'org.jitsi:org.otr4j:0.22'
 34	compile 'org.gnu.inet:libidn:1.15'
 35	compile 'com.google.zxing:core:3.2.1'
 36	compile 'com.google.zxing:android-integration:3.2.1'
 37	compile 'de.measite.minidns:minidns:0.1.7'
 38	compile 'de.timroes.android:EnhancedListView:0.3.4'
 39	compile 'me.leolin:ShortcutBadger:1.1.3@aar'
 40	compile 'com.kyleduo.switchbutton:library:1.2.8'
 41	compile 'org.whispersystems:axolotl-android:1.3.4'
 42	compile 'com.makeramen:roundedimageview:2.2.0'
 43}
 44
 45android {
 46	compileSdkVersion 23
 47	buildToolsVersion "23.0.1"
 48
 49	defaultConfig {
 50		minSdkVersion 14
 51		targetSdkVersion 21
 52		versionCode 105
 53		versionName "1.7.2"
 54		project.ext.set(archivesBaseName, archivesBaseName + "-" + versionName);
 55	}
 56
 57	compileOptions {
 58		sourceCompatibility JavaVersion.VERSION_1_7
 59		targetCompatibility JavaVersion.VERSION_1_7
 60	}
 61
 62	//
 63	// To sign release builds, create the file `gradle.properties` in
 64	// $HOME/.gradle or in your project directory with this content:
 65	//
 66	// mStoreFile=/path/to/key.store
 67	// mStorePassword=xxx
 68	// mKeyAlias=alias
 69	// mKeyPassword=xxx
 70	//
 71	if (project.hasProperty('mStoreFile') &&
 72			project.hasProperty('mStorePassword') &&
 73			project.hasProperty('mKeyAlias') &&
 74			project.hasProperty('mKeyPassword')) {
 75		signingConfigs {
 76			release {
 77				storeFile file(mStoreFile)
 78					storePassword mStorePassword
 79					keyAlias mKeyAlias
 80					keyPassword mKeyPassword
 81			}
 82		}
 83		buildTypes.release.signingConfig = signingConfigs.release
 84	} else {
 85		buildTypes.release.signingConfig = null
 86	}
 87
 88	applicationVariants.all { variant ->
 89		if (variant.name.equals('release')) {
 90			variant.outputs.each { output ->
 91				if (output.zipAlign != null) {
 92					output.zipAlign.outputFile = new File(output.outputFile.parent, rootProject.name + "-${variant.versionName}.apk")
 93				}
 94			}
 95		}
 96	}
 97
 98	lintOptions {
 99		disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
100	}
101
102	subprojects {
103
104		afterEvaluate {
105			if (getPlugins().hasPlugin('android') ||
106					getPlugins().hasPlugin('android-library')) {
107
108				configure(android.lintOptions) {
109					disable 'AndroidGradlePluginVersion', 'MissingTranslation'
110				}
111			}
112
113		}
114	}
115}