1// Top-level build file where you can add configuration options common to all
2// sub-projects/modules.
3buildscript {
4 repositories {
5 google()
6 mavenCentral()
7 }
8 dependencies {
9 classpath 'com.android.tools.build:gradle:7.2.1'
10 }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16 google()
17 mavenCentral()
18 jcenter()
19}
20
21configurations {
22 playstoreImplementation
23 freeImplementation
24 conversationsFreeImplementation
25 conversationsPlaystorImplementation
26 conversationsPlaystoreImplementation
27 quicksyPlaystoreImplementation
28 quicksyPlaystoreImplementation
29 quicksyFreeImplementation
30 quicksyImplementation
31}
32
33dependencies {
34 implementation 'androidx.viewpager:viewpager:1.0.0'
35
36 playstoreImplementation('com.google.firebase:firebase-messaging:23.0.6') {
37 exclude group: 'com.google.firebase', module: 'firebase-core'
38 exclude group: 'com.google.firebase', module: 'firebase-analytics'
39 exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
40 }
41 conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
42 quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'
43 implementation 'org.sufficientlysecure:openpgp-api:10.0'
44 implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
45 implementation 'androidx.appcompat:appcompat:1.4.2'
46 implementation 'androidx.exifinterface:exifinterface:1.3.3'
47 implementation 'androidx.cardview:cardview:1.0.0'
48 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
49 implementation 'com.google.android.material:material:1.4.0'
50
51 implementation "androidx.emoji2:emoji2:1.1.0"
52 freeImplementation "androidx.emoji2:emoji2-bundled:1.1.0"
53
54 implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
55 //zxing stopped supporting Java 7 so we have to stick with 3.3.3
56 //https://github.com/zxing/zxing/issues/1170
57 implementation 'com.google.zxing:core:3.3.3'
58 implementation 'de.measite.minidns:minidns-hla:0.2.4'
59 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
60 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
61 implementation 'com.makeramen:roundedimageview:2.3.0'
62 implementation "com.wefika:flowlayout:0.4.1"
63 implementation 'com.otaliastudios:transcoder:0.10.4'
64
65 implementation 'org.jxmpp:jxmpp-jid:1.0.3'
66 implementation 'org.osmdroid:osmdroid-android:6.1.11'
67 implementation 'org.hsluv:hsluv:0.2'
68 implementation 'org.conscrypt:conscrypt-android:2.5.2'
69 implementation 'me.drakeet.support:toastcompat:1.1.0'
70 implementation "com.leinardi.android:speed-dial:3.2.0"
71
72 implementation "com.squareup.retrofit2:retrofit:2.9.0"
73 implementation "com.squareup.retrofit2:converter-gson:2.9.0"
74 implementation "com.squareup.okhttp3:okhttp:4.10.0"
75
76 implementation 'com.google.guava:guava:30.1.1-android'
77 quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.49'
78 implementation 'ch.threema:webrtc-android:100.0.0'
79}
80
81ext {
82 travisBuild = System.getenv("TRAVIS") == "true"
83 preDexEnabled = System.getProperty("pre-dex", "true")
84 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
85}
86
87android {
88 namespace 'eu.siacs.conversations'
89 compileSdkVersion 32
90
91 defaultConfig {
92 minSdkVersion 21
93 targetSdkVersion 32
94 versionCode 42037
95 versionName "2.10.9"
96 archivesBaseName += "-$versionName"
97 applicationId "eu.siacs.conversations"
98 resValue "string", "applicationId", applicationId
99 def appName = "Conversations"
100 resValue "string", "app_name", appName
101 buildConfigField "String", "APP_NAME", "\"$appName\"";
102 }
103
104 splits {
105 abi {
106 universalApk true
107 enable true
108 }
109 }
110
111 configurations {
112 implementation.exclude group: 'org.jetbrains' , module:'annotations'
113 }
114
115 dataBinding {
116 enabled true
117 }
118
119 compileOptions {
120 sourceCompatibility JavaVersion.VERSION_1_8
121 targetCompatibility JavaVersion.VERSION_1_8
122 }
123
124 flavorDimensions("mode", "distribution")
125
126 productFlavors {
127
128 quicksy {
129 dimension "mode"
130 applicationId = "im.quicksy.client"
131 resValue "string", "applicationId", applicationId
132
133 def appName = "Quicksy"
134 resValue "string", "app_name", appName
135 buildConfigField "String", "APP_NAME", "\"$appName\"";
136 }
137
138 conversations {
139 dimension "mode"
140 }
141
142 playstore {
143 dimension "distribution"
144 versionNameSuffix "+playstore"
145 }
146 free {
147 dimension "distribution"
148 versionNameSuffix "+free"
149 }
150 }
151
152 sourceSets {
153 quicksyFree {
154 java {
155 srcDir 'src/quicksyFree/java'
156 }
157 }
158 quicksyPlaystore {
159 java {
160 srcDir 'src/quicksyPlaystore/java'
161 }
162 res {
163 srcDir 'src/quicksyPlaystore/res'
164 }
165 }
166 conversationsFree {
167 java {
168 srcDir 'src/conversationsFree/java'
169 }
170 }
171 conversationsPlaystore {
172 java {
173 srcDir 'src/conversationsPlaystore/java'
174 }
175 res {
176 srcDir 'src/conversationsPlaystore/res'
177 }
178 }
179 }
180
181 buildTypes {
182 release {
183 shrinkResources true
184 minifyEnabled true
185 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
186 }
187 debug {
188 shrinkResources true
189 minifyEnabled true
190 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
191 }
192 }
193
194
195 if (new File("signing.properties").exists()) {
196 Properties props = new Properties()
197 props.load(new FileInputStream(file("signing.properties")))
198
199 signingConfigs {
200 release {
201 storeFile file(props['keystore'])
202 storePassword props['keystore.password']
203 keyAlias props['keystore.alias']
204 keyPassword props['keystore.password']
205 }
206 }
207 buildTypes.release.signingConfig = signingConfigs.release
208 }
209
210
211 subprojects {
212
213 afterEvaluate {
214 if (getPlugins().hasPlugin('android') ||
215 getPlugins().hasPlugin('android-library')) {
216
217 configure(android.lintOptions) {
218 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
219 }
220 }
221
222 }
223 }
224 packagingOptions {
225 resources {
226 excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF']
227 }
228 }
229 lint {
230 disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
231 }
232
233 android.applicationVariants.all { variant ->
234 variant.outputs.each { output ->
235 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
236 if (baseAbiVersionCode != null) {
237 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
238 } else {
239 output.versionCodeOverride = 100 * project.android.defaultConfig.versionCode
240 }
241 }
242
243 }
244}