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.5.2'
10 }
11}
12
13plugins {
14 id 'org.ajoberstar.grgit' version '4.1.1'
15 // PLUGIN INSERT
16}
17
18apply plugin: 'com.android.application'
19
20repositories {
21 google()
22 mavenCentral()
23 maven { url='https://jitpack.io'}
24}
25
26def tags = grgit.tag.list().findAll { it.dateTime != null }.sort { it.dateTime }
27
28// ROOT INSERT
29
30configurations {
31 playstoreImplementation
32 freeImplementation
33 conversationsFreeImplementation
34 cheogramPlaystoreImplementation
35 conversationsPlaystoreImplementation
36 quicksyPlaystoreImplementation
37 quicksyPlaystoreImplementation
38 quicksyFreeImplementation
39 quicksyImplementation
40}
41
42dependencies {
43 androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
44 androidTestImplementation 'junit:junit:4.13.2'
45 androidTestImplementation 'androidx.test:runner:1.3.0'
46 androidTestImplementation 'androidx.test:rules:1.3.0'
47 androidTestImplementation 'androidx.test.ext:junit:1.1.2'
48 androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
49
50 implementation "androidx.core:core:1.10.1"
51 coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
52
53 implementation project(':libs:annotation')
54 annotationProcessor project(':libs:annotation-processor')
55
56
57 implementation 'androidx.viewpager:viewpager:1.0.0'
58
59 playstoreImplementation('com.google.firebase:firebase-messaging:24.0.0') {
60 exclude group: 'com.google.firebase', module: 'firebase-core'
61 exclude group: 'com.google.firebase', module: 'firebase-analytics'
62 exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
63 }
64 cheogramPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
65 cheogramPlaystoreImplementation 'com.github.singpolyma:play-licensing:1c637ea03c'
66 conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
67 quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.1.0'
68 implementation 'com.github.open-keychain.open-keychain:openpgp-api:v5.7.1'
69 implementation("com.github.CanHub:Android-Image-Cropper:2.0.0")
70 implementation 'androidx.appcompat:appcompat:1.7.0'
71 implementation 'androidx.exifinterface:exifinterface:1.3.7'
72 implementation 'androidx.cardview:cardview:1.0.0'
73 implementation "androidx.preference:preference:1.2.1"
74 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
75 implementation 'com.google.android.material:material:1.12.0'
76 implementation 'androidx.work:work-runtime:2.9.0'
77
78 implementation "androidx.emoji2:emoji2:1.4.0"
79 freeImplementation "androidx.emoji2:emoji2-bundled:1.4.0"
80
81 implementation 'org.bouncycastle:bcmail-jdk18on:1.78.1'
82 implementation 'com.google.zxing:core:3.5.3'
83 implementation 'org.minidns:minidns-hla:1.0.5'
84 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
85 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
86 implementation "com.wefika:flowlayout:0.4.1"
87
88 //noinspection GradleDependency
89 implementation('com.github.natario1:Transcoder:v0.9.1') {
90 exclude group: 'com.otaliastudios.opengl', module: 'egloo'
91 }
92 implementation 'com.github.natario1:Egloo:v0.4.0'
93
94 implementation 'org.jxmpp:jxmpp-jid:1.0.3'
95 implementation 'org.jxmpp:jxmpp-stringprep-libidn:1.0.3'
96 implementation 'org.osmdroid:osmdroid-android:6.1.11'
97 implementation 'org.hsluv:hsluv:0.2'
98 implementation 'org.conscrypt:conscrypt-android:2.5.2'
99 implementation 'me.drakeet.support:toastcompat:1.1.0'
100 implementation "com.leinardi.android:speed-dial:3.3.0"
101
102 implementation "com.squareup.retrofit2:retrofit:2.11.0"
103 implementation "com.squareup.retrofit2:converter-gson:2.11.0"
104 implementation "com.squareup.okhttp3:okhttp:4.12.0"
105
106 implementation 'com.google.guava:guava:32.1.3-android'
107 implementation 'io.michaelrocks:libphonenumber-android:8.13.35'
108 implementation 'im.conversations.webrtc:webrtc-android:119.0.1'
109 implementation 'io.github.nishkarsh:android-permissions:2.1.6'
110 implementation 'androidx.recyclerview:recyclerview:1.1.0'
111 implementation 'androidx.documentfile:documentfile:1.0.1'
112 implementation 'androidx.browser:browser:1.8.0'
113 implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'
114 implementation 'com.github.ipld:java-cid:v1.3.1'
115 //implementation 'com.splitwise:tokenautocomplete:3.0.2'
116 implementation 'com.github.singpolyma:TokenAutoComplete:bfa93780e0'
117 implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4'
118 implementation 'com.github.singpolyma:android-identicons:3361281bd4'
119 implementation 'com.github.woltapp:blurhash:master'
120 implementation 'com.caverock:androidsvg-aar:1.4'
121 implementation 'org.tomlj:tomlj:1.1.0'
122 implementation 'com.tbuonomo:dotsindicator:4.2'
123 implementation 'com.github.Priyansh-Kedia:OpenGraphParser:2.5.6'
124 implementation 'me.xdrop:fuzzywuzzy:1.4.0'
125 implementation 'net.fellbaum:jemoji:1.4.1'
126 implementation 'com.github.natario1:Autocomplete:v1.1.0'
127}
128
129ext {
130 preDexEnabled = System.getProperty("pre-dex", "true")
131 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
132}
133
134android {
135 namespace 'eu.siacs.conversations'
136 compileSdk 34
137
138 defaultConfig {
139 minSdkVersion 23
140 targetSdkVersion 34
141 versionCode 42025 + tags.size()
142 versionName grgit.describe(always: true)
143 applicationId "eu.siacs.conversations"
144 def appName = "Conversations"
145 resValue "string", "app_name", appName
146 buildConfigField "String", "APP_NAME", "\"$appName\"";
147 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
148 }
149
150 splits {
151 abi {
152 universalApk true
153 enable true
154 reset()
155 //noinspection ChromeOsAbiSupport
156 include project.ext.abiCodes.keySet() as String[]
157 }
158 }
159
160 configurations {
161 implementation.exclude group: 'org.jetbrains' , module:'annotations'
162 }
163
164 dataBinding {
165 enabled true
166 }
167
168 compileOptions {
169 coreLibraryDesugaringEnabled true
170 sourceCompatibility JavaVersion.VERSION_17
171 targetCompatibility JavaVersion.VERSION_17
172 }
173
174 flavorDimensions += "mode"
175 flavorDimensions += "distribution"
176
177 productFlavors {
178
179 quicksy {
180 dimension "mode"
181 applicationId = "im.quicksy.client"
182
183 def appName = "Quicksy"
184 resValue "string", "app_name", appName
185 buildConfigField "String", "APP_NAME", "\"$appName\""
186 buildConfigField "String", "PRIVACY_POLICY", "\"https://quicksy.im/privacy.htm\""
187 }
188
189 conversations {
190 dimension "mode"
191 buildConfigField "String", "PRIVACY_POLICY", "\"https://conversations.im/privacy.html\""
192 }
193
194 cheogram {
195 dimension "mode"
196
197 applicationId = "com.cheogram.android"
198
199 def appName = "Cheogram"
200 resValue "string", "app_name", appName
201 buildConfigField "String", "APP_NAME", "\"$appName\"";
202 buildConfigField "String", "PRIVACY_POLICY", "\"https://cheogram.com/android-privacy.html\""
203 }
204
205 playstore {
206 dimension "distribution"
207 versionNameSuffix "+playstore"
208 applicationIdSuffix "playstore"
209 }
210 free {
211 dimension "distribution"
212 versionNameSuffix "+free"
213 }
214 }
215
216 applicationVariants.all { variant ->
217 variant.resValue "string", "applicationId", applicationId
218 }
219
220 sourceSets {
221 quicksyFree {
222 java {
223 srcDir 'src/quicksyFree/java'
224 }
225 }
226 quicksyPlaystore {
227 java {
228 srcDir 'src/quicksyPlaystore/java'
229 }
230 res {
231 srcDir 'src/quicksyPlaystore/res'
232 }
233 }
234 conversationsFree {
235 java {
236 srcDir 'src/conversationsFree/java'
237 }
238 }
239 cheogramFree {
240 java {
241 srcDir 'src/conversationsFree/java'
242 }
243 }
244 conversationsPlaystore {
245 java {
246 srcDir 'src/conversationsPlaystore/java'
247 }
248 res {
249 srcDir 'src/conversationsPlaystore/res'
250 }
251 }
252 }
253
254 buildTypes {
255 release {
256 shrinkResources true
257 minifyEnabled true
258 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
259 ndk.debugSymbolLevel = 'full'
260 }
261 debug {
262 shrinkResources true
263 minifyEnabled true
264 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
265 }
266 }
267
268
269 if (new File("signing.properties").exists()) {
270 Properties props = new Properties()
271 props.load(new FileInputStream(file("signing.properties")))
272
273 signingConfigs {
274 release {
275 storeFile file(props['keystore'])
276 storePassword props['keystore.password']
277 keyAlias props['keystore.alias']
278 keyPassword props['keystore.password']
279 }
280 }
281 buildTypes.release.signingConfig = signingConfigs.release
282 }
283
284 lintOptions {
285 disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
286 abortOnError false
287 }
288
289 subprojects {
290
291 afterEvaluate {
292 if (getPlugins().hasPlugin('android') ||
293 getPlugins().hasPlugin('android-library')) {
294
295 configure(android.lintOptions) {
296 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
297 abortOnError false
298 }
299 }
300
301 }
302 }
303 packagingOptions {
304 resources {
305 excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF', 'META-INF/versions/9/OSGI-INF/MANIFEST.MF']
306 }
307 }
308 lint {
309 disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
310 }
311 buildFeatures {
312 buildConfig true
313 }
314
315 android.applicationVariants.configureEach { variant ->
316 variant.outputs.each { output ->
317 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
318 if (baseAbiVersionCode != null) {
319 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
320 } else {
321 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + 4
322 }
323 }
324
325 }
326}