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.0.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:openpgp-api-lib')
 29	compile project(':libs:MemorizingTrustManager')
 30	compile 'com.android.support:support-v13:21.0.3'
 31	compile 'org.bouncycastle:bcprov-jdk15on:1.51'
 32	compile 'org.jitsi:org.otr4j:0.22'
 33	compile 'org.gnu.inet:libidn:1.15'
 34	compile 'com.google.zxing:core:3.1.0'
 35	compile 'com.google.zxing:android-integration:3.1.0'
 36	compile 'de.measite.minidns:minidns:0.1.3'
 37}
 38
 39android {
 40	compileSdkVersion 21
 41	buildToolsVersion "21.1.2"
 42
 43	defaultConfig {
 44		minSdkVersion 14
 45		targetSdkVersion 21
 46		versionCode 56
 47		versionName "1.2.0"
 48	}
 49
 50	compileOptions {
 51		sourceCompatibility JavaVersion.VERSION_1_7
 52		targetCompatibility JavaVersion.VERSION_1_7
 53	}
 54
 55	//
 56	// To sign release builds, create the file `gradle.properties` in
 57	// $HOME/.gradle or in your project directory with this content:
 58	//
 59	// mStoreFile=/path/to/key.store
 60	// mStorePassword=xxx
 61	// mKeyAlias=alias
 62	// mKeyPassword=xxx
 63	//
 64	if (project.hasProperty('mStoreFile') &&
 65			project.hasProperty('mStorePassword') &&
 66			project.hasProperty('mKeyAlias') &&
 67			project.hasProperty('mKeyPassword')) {
 68		signingConfigs {
 69			release {
 70				storeFile file(mStoreFile)
 71					storePassword mStorePassword
 72					keyAlias mKeyAlias
 73					keyPassword mKeyPassword
 74			}
 75		}
 76		buildTypes.release.signingConfig = signingConfigs.release
 77	} else {
 78		buildTypes.release.signingConfig = null
 79	}
 80
 81	applicationVariants.all { variant ->
 82		if (variant.name.equals('release')) {
 83			variant.outputs.each { output ->
 84				if (output.zipAlign != null) {
 85					output.zipAlign.outputFile = new File(output.outputFile.parent, rootProject.name + "-${variant.versionName}.apk")
 86				}
 87				output.packageApplication.outputFile = new File(output.outputFile.parent, output.packageApplication.outputFile.name
 88					.replace(".apk", "-${variant.versionName}.apk"))
 89			}
 90		}
 91	}
 92
 93	lintOptions {
 94		disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage'
 95	}
 96
 97	subprojects {
 98
 99		afterEvaluate {
100			if (getPlugins().hasPlugin('android') ||
101					getPlugins().hasPlugin('android-library')) {
102
103				configure(android.lintOptions) {
104					disable 'AndroidGradlePluginVersion', 'MissingTranslation'
105				}
106			}
107
108		}
109	}
110}