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:8.3.1'
10 }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16 google()
17 mavenCentral()
18 maven { url='https://jitpack.io'}
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 coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
35
36 implementation 'androidx.viewpager:viewpager:1.0.0'
37
38 playstoreImplementation('com.google.firebase:firebase-messaging:23.4.1') {
39 exclude group: 'com.google.firebase', module: 'firebase-core'
40 exclude group: 'com.google.firebase', module: 'firebase-analytics'
41 exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
42 }
43 conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
44 quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.0.2'
45 implementation 'com.github.open-keychain.open-keychain:openpgp-api:v5.7.1'
46 implementation("com.github.CanHub:Android-Image-Cropper:2.0.0")
47 implementation 'androidx.appcompat:appcompat:1.6.1'
48 implementation 'androidx.exifinterface:exifinterface:1.3.7'
49 implementation 'androidx.cardview:cardview:1.0.0'
50 implementation "androidx.preference:preference:1.2.1"
51 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
52 implementation 'com.google.android.material:material:1.11.0'
53 implementation 'androidx.work:work-runtime:2.9.0'
54
55 implementation "androidx.emoji2:emoji2:1.4.0"
56 freeImplementation "androidx.emoji2:emoji2-bundled:1.4.0"
57
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 'org.minidns:minidns-client:1.0.4'
63 implementation 'org.minidns:minidns-dnssec:1.0.4'
64 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
65 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
66 implementation 'com.makeramen:roundedimageview:2.3.0'
67
68 //noinspection GradleDependency
69 implementation('com.github.natario1:Transcoder:v0.9.1') {
70 exclude group: 'com.otaliastudios.opengl', module: 'egloo'
71 }
72 implementation 'com.github.natario1:Egloo:v0.4.0'
73
74 implementation 'org.jxmpp:jxmpp-jid:1.0.3'
75 implementation 'org.jxmpp:jxmpp-stringprep-libidn:1.0.3'
76 implementation 'org.osmdroid:osmdroid-android:6.1.11'
77 implementation 'org.hsluv:hsluv:0.2'
78 implementation 'org.conscrypt:conscrypt-android:2.5.2'
79 implementation 'me.drakeet.support:toastcompat:1.1.0'
80 implementation "com.leinardi.android:speed-dial:3.3.0"
81
82 implementation "com.squareup.retrofit2:retrofit:2.9.0"
83 implementation "com.squareup.retrofit2:converter-gson:2.9.0"
84 implementation "com.squareup.okhttp3:okhttp:4.12.0"
85
86 implementation 'com.google.guava:guava:32.1.3-android'
87 quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.13.28'
88 implementation 'im.conversations.webrtc:webrtc-android:119.0.1'
89}
90
91ext {
92 preDexEnabled = System.getProperty("pre-dex", "true")
93 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
94}
95
96android {
97 namespace 'eu.siacs.conversations'
98 compileSdk 34
99
100 defaultConfig {
101 minSdkVersion 23
102 targetSdkVersion 34
103 versionCode 42110
104 versionName "2.15.3"
105 archivesBaseName += "-$versionName"
106 applicationId "eu.siacs.conversations"
107 resValue "string", "applicationId", applicationId
108 def appName = "Conversations"
109 resValue "string", "app_name", appName
110 buildConfigField "String", "APP_NAME", "\"$appName\""
111 }
112
113 splits {
114 abi {
115 universalApk true
116 enable true
117 reset()
118 //noinspection ChromeOsAbiSupport
119 include project.ext.abiCodes.keySet() as String[]
120 }
121 }
122
123 configurations {
124 implementation.exclude group: 'org.jetbrains' , module:'annotations'
125 }
126
127 dataBinding {
128 enabled true
129 }
130
131 compileOptions {
132 coreLibraryDesugaringEnabled true
133 sourceCompatibility JavaVersion.VERSION_17
134 targetCompatibility JavaVersion.VERSION_17
135 }
136
137 flavorDimensions += "mode"
138 flavorDimensions += "distribution"
139
140 productFlavors {
141
142 quicksy {
143 dimension "mode"
144 applicationId = "im.quicksy.client"
145 resValue "string", "applicationId", applicationId
146
147 def appName = "Quicksy"
148 resValue "string", "app_name", appName
149 buildConfigField "String", "APP_NAME", "\"$appName\""
150 buildConfigField "String", "PRIVACY_POLICY", "\"https://quicksy.im/privacy.htm\""
151 }
152
153 conversations {
154 dimension "mode"
155 buildConfigField "String", "PRIVACY_POLICY", "\"https://conversations.im/privacy.html\""
156 }
157
158 playstore {
159 dimension "distribution"
160 versionNameSuffix "+playstore"
161 }
162 free {
163 dimension "distribution"
164 versionNameSuffix "+free"
165 }
166 }
167
168 sourceSets {
169 quicksyFree {
170 java {
171 srcDir 'src/quicksyFree/java'
172 }
173 }
174 quicksyPlaystore {
175 java {
176 srcDir 'src/quicksyPlaystore/java'
177 }
178 res {
179 srcDir 'src/quicksyPlaystore/res'
180 }
181 }
182 conversationsFree {
183 java {
184 srcDir 'src/conversationsFree/java'
185 }
186 }
187 conversationsPlaystore {
188 java {
189 srcDir 'src/conversationsPlaystore/java'
190 }
191 res {
192 srcDir 'src/conversationsPlaystore/res'
193 }
194 }
195 }
196
197 buildTypes {
198 release {
199 shrinkResources true
200 minifyEnabled true
201 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
202 }
203 debug {
204 shrinkResources true
205 minifyEnabled true
206 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
207 }
208 }
209
210
211 if (new File("signing.properties").exists()) {
212 Properties props = new Properties()
213 props.load(new FileInputStream(file("signing.properties")))
214
215 signingConfigs {
216 release {
217 storeFile file(props['keystore'])
218 storePassword props['keystore.password']
219 keyAlias props['keystore.alias']
220 keyPassword props['keystore.password']
221 }
222 }
223 buildTypes.release.signingConfig = signingConfigs.release
224 }
225
226
227 subprojects {
228
229 afterEvaluate {
230 if (getPlugins().hasPlugin('android') ||
231 getPlugins().hasPlugin('android-library')) {
232
233 configure(android.lintOptions) {
234 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
235 }
236 }
237
238 }
239 }
240 packagingOptions {
241 resources {
242 excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF']
243 }
244 }
245 lint {
246 disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
247 }
248 buildFeatures {
249 buildConfig true
250 }
251
252 android.applicationVariants.configureEach { variant ->
253 variant.outputs.each { output ->
254 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
255 if (baseAbiVersionCode != null) {
256 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
257 } else {
258 output.versionCodeOverride = 100 * project.android.defaultConfig.versionCode
259 }
260 }
261
262 }
263}