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 maven {
24 url "http://jitsi.github.com/otr4j/repository/"
25 }
26 jcenter()
27 mavenCentral()
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 'org.gnu.inet:libidn:1.15'
38 compile 'com.google.zxing:core:3.1.0'
39 compile 'com.google.zxing:android-integration:3.1.0'
40}
41
42android {
43 compileSdkVersion 19
44 buildToolsVersion "19.1"
45
46 defaultConfig {
47 minSdkVersion 14
48 targetSdkVersion 19
49 versionCode 39
50 versionName "0.9.2"
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 buildTypes {
85 applicationVariants.all { variant ->
86 def fileName = variant.packageApplication.outputFile.name.replace(".apk",
87 "-" + defaultConfig.versionName + ".apk")
88 variant.packageApplication.outputFile = new
89 File(variant.packageApplication.outputFile.parent, fileName)
90 if (variant.zipAlign) {
91 if (variant.name.equals('release')) {
92 variant.outputFile = new File(variant.outputFile.parent,
93 rootProject.name + "-" + defaultConfig.versionName + ".apk")
94 }
95 }
96 }
97 }
98
99 lintOptions {
100 disable 'MissingTranslation', 'InvalidPackage'
101 }
102
103 subprojects {
104
105 afterEvaluate {
106 if (getPlugins().hasPlugin('android') ||
107 getPlugins().hasPlugin('android-library')) {
108
109 configure(android.lintOptions) {
110 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
111 }
112 }
113
114 }
115 }
116}