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