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	compile 'de.timroes.android:EnhancedListView:0.3.4'
 38}
 39
 40android {
 41	compileSdkVersion 22
 42	buildToolsVersion "22.0.1"
 43
 44	defaultConfig {
 45		minSdkVersion 14
 46		targetSdkVersion 21
 47		versionCode 66
 48		versionName "1.4.0"
 49	}
 50
 51	compileOptions {
 52		sourceCompatibility JavaVersion.VERSION_1_7
 53		targetCompatibility JavaVersion.VERSION_1_7
 54	}
 55
 56	//
 57	// To sign release builds, create the file `gradle.properties` in
 58	// $HOME/.gradle or in your project directory with this content:
 59	//
 60	// mStoreFile=/path/to/key.store
 61	// mStorePassword=xxx
 62	// mKeyAlias=alias
 63	// mKeyPassword=xxx
 64	//
 65	if (project.hasProperty('mStoreFile') &&
 66			project.hasProperty('mStorePassword') &&
 67			project.hasProperty('mKeyAlias') &&
 68			project.hasProperty('mKeyPassword')) {
 69		signingConfigs {
 70			release {
 71				storeFile file(mStoreFile)
 72					storePassword mStorePassword
 73					keyAlias mKeyAlias
 74					keyPassword mKeyPassword
 75			}
 76		}
 77		buildTypes.release.signingConfig = signingConfigs.release
 78	} else {
 79		buildTypes.release.signingConfig = null
 80	}
 81
 82	applicationVariants.all { variant ->
 83		if (variant.name.equals('release')) {
 84			variant.outputs.each { output ->
 85				if (output.zipAlign != null) {
 86					output.zipAlign.outputFile = new File(output.outputFile.parent, rootProject.name + "-${variant.versionName}.apk")
 87				}
 88				output.packageApplication.outputFile = new File(output.outputFile.parent, output.packageApplication.outputFile.name
 89					.replace(".apk", "-${variant.versionName}.apk"))
 90			}
 91		}
 92	}
 93
 94	lintOptions {
 95		disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity'
 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}