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