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