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:0.12.2'
 10	}
 11}
 12
 13allprojects {
 14	repositories {
 15		jcenter()
 16		mavenCentral()
 17	}
 18}
 19
 20apply plugin: 'android'
 21
 22repositories {
 23	jcenter()
 24	mavenCentral()
 25	maven {
 26		url "http://jitsi.github.com/otr4j/repository/"
 27	}
 28}
 29
 30dependencies {
 31	compile project(':libs/minidns')
 32	compile project(':libs/openpgp-api-lib')
 33	compile project(':libs/MemorizingTrustManager')
 34	compile 'com.android.support:support-v13:19.1.0'
 35	compile 'org.bouncycastle:bcprov-jdk15on:1.50'
 36	compile 'net.java:otr4j:0.21'
 37	compile fileTree(dir: 'libs', include: ['*.jar'])
 38}
 39
 40android {
 41	compileSdkVersion 19
 42	buildToolsVersion "19.1"
 43
 44	defaultConfig {
 45		minSdkVersion 14
 46		targetSdkVersion 19
 47		versionCode 32
 48		versionName "0.8-alpha"
 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	buildTypes {
 83		release {
 84			runProguard true
 85			proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
 86		}
 87	}
 88
 89	lintOptions {
 90		disable 'MissingTranslation', 'InvalidPackage'
 91	}
 92
 93	subprojects {
 94
 95		afterEvaluate {
 96			if (getPlugins().hasPlugin('android') ||
 97					getPlugins().hasPlugin('android-library')) {
 98
 99				configure(android.lintOptions) {
100					disable 'AndroidGradlePluginVersion', 'MissingTranslation'
101				}
102			}
103
104		}
105	}
106}