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 maven {
27 url "https://oss.sonatype.org/content/repositories/releases/"
28 }
29 jcenter()
30 mavenCentral()
31}
32
33dependencies {
34 compile project(':libs:minidns')
35 compile project(':libs:openpgp-api-lib')
36 compile project(':libs:MemorizingTrustManager')
37 compile 'com.android.support:support-v13:19.1.0'
38 compile 'org.bouncycastle:bcprov-jdk15on:1.50'
39 compile 'net.java:otr4j:0.21'
40 compile 'org.jxmpp:jxmpp-stringprep-libidn:0.4.0'
41 compile 'com.google.zxing:core:3.1.0'
42 compile 'com.google.zxing:android-integration:3.1.0'
43}
44
45android {
46 compileSdkVersion 19
47 buildToolsVersion "19.1"
48
49 defaultConfig {
50 minSdkVersion 14
51 targetSdkVersion 19
52 versionCode 35
53 versionName "0.8.3"
54 }
55
56 compileOptions {
57 sourceCompatibility JavaVersion.VERSION_1_7
58 targetCompatibility JavaVersion.VERSION_1_7
59 }
60
61 //
62 // To sign release builds, create the file `gradle.properties` in
63 // $HOME/.gradle or in your project directory with this content:
64 //
65 // mStoreFile=/path/to/key.store
66 // mStorePassword=xxx
67 // mKeyAlias=alias
68 // mKeyPassword=xxx
69 //
70 if (project.hasProperty('mStoreFile') &&
71 project.hasProperty('mStorePassword') &&
72 project.hasProperty('mKeyAlias') &&
73 project.hasProperty('mKeyPassword')) {
74 signingConfigs {
75 release {
76 storeFile file(mStoreFile)
77 storePassword mStorePassword
78 keyAlias mKeyAlias
79 keyPassword mKeyPassword
80 }
81 }
82 buildTypes.release.signingConfig = signingConfigs.release
83 } else {
84 buildTypes.release.signingConfig = null
85 }
86
87 buildTypes {
88 applicationVariants.all { variant ->
89 def fileName = variant.packageApplication.outputFile.name.replace(".apk",
90 "-" + defaultConfig.versionName + ".apk")
91 variant.packageApplication.outputFile = new
92 File(variant.packageApplication.outputFile.parent, fileName)
93 if (variant.zipAlign) {
94 if (variant.name.equals('release')) {
95 variant.outputFile = new File(variant.outputFile.parent,
96 rootProject.name + "-" + defaultConfig.versionName + ".apk")
97 }
98 }
99 }
100 }
101
102 lintOptions {
103 disable 'MissingTranslation', 'InvalidPackage'
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}