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