1// Top-level build file where you can add configuration options common to all
2// sub-projects/modules.
3buildscript {
4 repositories {
5 google()
6 jcenter()
7 }
8 dependencies {
9 classpath 'com.android.tools.build:gradle:3.5.3'
10 }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16 google()
17 jcenter()
18 mavenCentral()
19}
20
21configurations {
22 playstoreImplementation
23 compatImplementation
24 conversationsFreeCompatImplementation
25 quicksyFreeCompatImplementation
26 quicksyImplementation
27}
28
29ext {
30 supportLibVersion = '28.0.0'
31}
32
33dependencies {
34 playstoreImplementation('com.google.firebase:firebase-messaging:17.3.4') {
35 exclude group: 'com.google.firebase', module: 'firebase-core'
36 exclude group: 'com.google.firebase', module: 'firebase-analytics'
37 exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
38 }
39 implementation 'org.sufficientlysecure:openpgp-api:10.0'
40 implementation('com.theartofdev.edmodo:android-image-cropper:2.7.+') {
41 exclude group: 'com.android.support', module: 'appcompat-v7'
42 exclude group: 'com.android.support', module: 'exifinterface'
43 }
44 implementation "com.android.support:support-v13:$supportLibVersion"
45 implementation "com.android.support:appcompat-v7:$supportLibVersion"
46 implementation "com.android.support:exifinterface:$supportLibVersion"
47 implementation "com.android.support:cardview-v7:$supportLibVersion"
48 implementation "com.android.support:support-emoji:$supportLibVersion"
49 implementation "com.android.support:design:$supportLibVersion"
50 compatImplementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
51 conversationsFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
52 quicksyFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
53 implementation 'org.bouncycastle:bcmail-jdk15on:1.58'
54 //zxing stopped supporting Java 7 so we have to stick with 3.3.3
55 //https://github.com/zxing/zxing/issues/1170
56 implementation 'com.google.zxing:core:3.3.3'
57 implementation 'de.measite.minidns:minidns-hla:0.2.4'
58 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
59 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
60 implementation 'com.makeramen:roundedimageview:2.3.0'
61 implementation "com.wefika:flowlayout:0.4.1"
62 implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
63 implementation project(':libs:xmpp-addr')
64 implementation 'org.osmdroid:osmdroid-android:6.1.5'
65 implementation 'org.hsluv:hsluv:0.2'
66 implementation 'org.conscrypt:conscrypt-android:2.2.1'
67 implementation 'me.drakeet.support:toastcompat:1.1.0'
68 implementation "com.leinardi.android:speed-dial:2.0.1"
69 implementation("com.squareup.retrofit2:retrofit:2.7.1") {
70 exclude group: "com.squareup.okhttp3", "module": "okhttp"
71 }
72 implementation("com.squareup.retrofit2:converter-gson:2.7.1") {
73 exclude group: "com.squareup.okhttp3", "module": "okhttp"
74 }
75 implementation 'com.squareup.okhttp3:okhttp:3.12.7'
76 implementation 'com.google.guava:guava:27.1-android'
77 quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.11.1'
78}
79
80ext {
81 travisBuild = System.getenv("TRAVIS") == "true"
82 preDexEnabled = System.getProperty("pre-dex", "true")
83}
84
85android {
86 compileSdkVersion 28
87
88 defaultConfig {
89 minSdkVersion 16
90 targetSdkVersion 28
91 versionCode 352
92 versionName "2.6.2"
93 archivesBaseName += "-$versionName"
94 applicationId "eu.siacs.conversations"
95 resValue "string", "applicationId", applicationId
96 resValue "string", "app_name", "Conversations"
97 buildConfigField "String", "LOGTAG", "\"conversations\""
98 }
99
100 dataBinding {
101 enabled true
102 }
103
104 dexOptions {
105 // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
106 preDexLibraries = preDexEnabled && !travisBuild
107 jumboMode true
108 }
109
110 compileOptions {
111 sourceCompatibility JavaVersion.VERSION_1_8
112 targetCompatibility JavaVersion.VERSION_1_8
113 }
114
115 flavorDimensions("mode", "distribution", "emoji")
116
117 productFlavors {
118
119 quicksy {
120 dimension "mode"
121 applicationId = "im.quicksy.client"
122 resValue "string", "app_name", "Quicksy"
123 resValue "string", "applicationId", applicationId
124 buildConfigField "String", "LOGTAG", "\"quicksy\""
125 }
126
127 conversations {
128 dimension "mode"
129 }
130
131 playstore {
132 dimension "distribution"
133 versionNameSuffix "+p"
134 }
135 free {
136 dimension "distribution"
137 versionNameSuffix "+f"
138 }
139 system {
140 dimension "emoji"
141 versionNameSuffix "s"
142 }
143 compat {
144 dimension "emoji"
145 versionNameSuffix "c"
146 }
147 }
148
149 sourceSets {
150 quicksyFreeCompat {
151 java {
152 srcDirs 'src/freeCompat/java'
153 }
154 }
155 quicksyPlaystoreCompat {
156 java {
157 srcDirs 'src/playstoreCompat/java'
158 }
159 res {
160 srcDir 'src/playstoreCompat/res'
161 srcDir 'src/quicksyPlaystore/res'
162 }
163 }
164 quicksyPlaystoreSystem {
165 res {
166 srcDir 'src/quicksyPlaystore/res'
167 }
168 }
169 conversationsFreeCompat {
170 java {
171 srcDirs 'src/freeCompat/java'
172 }
173 }
174 conversationsPlaystoreCompat {
175 java {
176 srcDirs 'src/playstoreCompat/java'
177 }
178 res {
179 srcDir 'src/playstoreCompat/res'
180 srcDir 'src/conversationsPlaystore/res'
181 }
182 }
183 conversationsPlaystoreSystem {
184 res {
185 srcDir 'src/conversationsPlaystore/res'
186 }
187 }
188 }
189
190 buildTypes {
191 release {
192 shrinkResources true
193 minifyEnabled true
194 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
195 versionNameSuffix "r"
196 }
197 debug {
198 shrinkResources true
199 minifyEnabled true
200 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
201 versionNameSuffix "d"
202 }
203 }
204
205
206 if (new File("signing.properties").exists()) {
207 Properties props = new Properties()
208 props.load(new FileInputStream(file("signing.properties")))
209
210 signingConfigs {
211 release {
212 storeFile file(props['keystore'])
213 storePassword props['keystore.password']
214 keyAlias props['keystore.alias']
215 keyPassword props['keystore.password']
216 }
217 }
218 buildTypes.release.signingConfig = signingConfigs.release
219 }
220
221 lintOptions {
222 disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
223 }
224
225 subprojects {
226
227 afterEvaluate {
228 if (getPlugins().hasPlugin('android') ||
229 getPlugins().hasPlugin('android-library')) {
230
231 configure(android.lintOptions) {
232 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
233 }
234 }
235
236 }
237 }
238
239 packagingOptions {
240 exclude 'META-INF/BCKEY.DSA'
241 exclude 'META-INF/BCKEY.SF'
242 }
243}