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.1.2'
52
53 implementation project(':libs:annotation')
54 annotationProcessor project(':libs:annotation-processor')
55
56 implementation 'androidx.viewpager:viewpager:1.0.0'
57
58 playstoreImplementation('com.google.firebase:firebase-messaging:24.0.1') {
59 exclude group: 'com.google.firebase', module: 'firebase-core'
60 exclude group: 'com.google.firebase', module: 'firebase-analytics'
61 exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
62 }
63 cheogramPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
64 cheogramPlaystoreImplementation 'com.github.singpolyma:play-licensing:1c637ea03c'
65 conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
66 quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.1.0'
67 implementation 'com.github.open-keychain.open-keychain:openpgp-api:v5.7.1'
68 implementation("com.github.CanHub:Android-Image-Cropper:2.0.0")
69 implementation 'androidx.appcompat:appcompat:1.7.0'
70 implementation 'androidx.exifinterface:exifinterface:1.3.7'
71 implementation 'androidx.cardview:cardview:1.0.0'
72 implementation "androidx.preference:preference:1.2.1"
73 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
74 implementation 'com.google.android.material:material:1.13.0-alpha06'
75 implementation 'androidx.work:work-runtime:2.9.1'
76
77 implementation "androidx.emoji2:emoji2:1.5.0"
78 freeImplementation "androidx.emoji2:emoji2-bundled:1.5.0"
79 implementation "androidx.emoji2:emoji2-emojipicker:1.5.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:129.0.0'
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.singpolyma:OpenGraphParser:d0882eadb2'
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 implementation 'com.mikepenz:materialdrawer:9.0.1'
128}
129
130ext {
131 preDexEnabled = System.getProperty("pre-dex", "true")
132 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
133}
134
135android {
136 namespace 'eu.siacs.conversations'
137 compileSdk 34
138
139 defaultConfig {
140 minSdkVersion 23
141 targetSdkVersion 34
142 versionCode 42025 + tags.size()
143 versionName grgit.describe(always: true)
144 applicationId "eu.siacs.conversations"
145 def appName = "Conversations"
146 resValue "string", "app_name", appName
147 buildConfigField "String", "APP_NAME", "\"$appName\"";
148 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
149 }
150
151 splits {
152 abi {
153 universalApk true
154 enable true
155 reset()
156 //noinspection ChromeOsAbiSupport
157 include project.ext.abiCodes.keySet() as String[]
158 }
159 }
160
161 configurations {
162 implementation.exclude group: 'org.jetbrains' , module:'annotations'
163 }
164
165 dataBinding {
166 enabled true
167 }
168
169 compileOptions {
170 coreLibraryDesugaringEnabled true
171 sourceCompatibility JavaVersion.VERSION_17
172 targetCompatibility JavaVersion.VERSION_17
173 }
174
175 flavorDimensions += "mode"
176 flavorDimensions += "distribution"
177
178 productFlavors {
179
180 quicksy {
181 dimension "mode"
182 applicationId = "im.quicksy.client"
183
184 def appName = "Quicksy"
185 resValue "string", "app_name", appName
186 buildConfigField "String", "APP_NAME", "\"$appName\""
187 buildConfigField "String", "PRIVACY_POLICY", "\"https://quicksy.im/privacy.htm\""
188 }
189
190 conversations {
191 dimension "mode"
192 buildConfigField "String", "PRIVACY_POLICY", "\"https://conversations.im/privacy.html\""
193 }
194
195 cheogram {
196 dimension "mode"
197
198 applicationId = "com.cheogram.android"
199
200 def appName = "Cheogram"
201 resValue "string", "app_name", appName
202 buildConfigField "String", "APP_NAME", "\"$appName\"";
203 buildConfigField "String", "PRIVACY_POLICY", "\"https://cheogram.com/android-privacy.html\""
204 }
205
206 playstore {
207 dimension "distribution"
208 versionNameSuffix "+playstore"
209 applicationIdSuffix "playstore"
210 }
211 free {
212 dimension "distribution"
213 versionNameSuffix "+free"
214 }
215 }
216
217 applicationVariants.all { variant ->
218 variant.resValue "string", "applicationId", applicationId
219 }
220
221 sourceSets {
222 quicksyFree {
223 java {
224 srcDir 'src/quicksyFree/java'
225 }
226 }
227 quicksyPlaystore {
228 java {
229 srcDir 'src/quicksyPlaystore/java'
230 }
231 res {
232 srcDir 'src/quicksyPlaystore/res'
233 }
234 }
235 conversationsFree {
236 java {
237 srcDir 'src/conversationsFree/java'
238 }
239 }
240 cheogramFree {
241 java {
242 srcDir 'src/conversationsFree/java'
243 }
244 }
245 conversationsPlaystore {
246 java {
247 srcDir 'src/conversationsPlaystore/java'
248 }
249 res {
250 srcDir 'src/conversationsPlaystore/res'
251 }
252 }
253 }
254
255 buildTypes {
256 release {
257 shrinkResources true
258 minifyEnabled true
259 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
260 ndk.debugSymbolLevel = 'full'
261 }
262 }
263
264
265 if (new File("signing.properties").exists()) {
266 Properties props = new Properties()
267 props.load(new FileInputStream(file("signing.properties")))
268
269 signingConfigs {
270 release {
271 storeFile file(props['keystore'])
272 storePassword props['keystore.password']
273 keyAlias props['keystore.alias']
274 keyPassword props['keystore.password']
275 }
276 }
277 buildTypes.release.signingConfig = signingConfigs.release
278 }
279
280 lintOptions {
281 disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
282 abortOnError false
283 }
284
285 subprojects {
286
287 afterEvaluate {
288 if (getPlugins().hasPlugin('android') ||
289 getPlugins().hasPlugin('android-library')) {
290
291 configure(android.lintOptions) {
292 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
293 abortOnError false
294 }
295 }
296
297 }
298 }
299 packagingOptions {
300 resources {
301 excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF', 'META-INF/versions/9/OSGI-INF/MANIFEST.MF']
302 }
303 }
304 lint {
305 disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
306 }
307 buildFeatures {
308 buildConfig true
309 }
310
311 android.applicationVariants.configureEach { variant ->
312 variant.outputs.each { output ->
313 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
314 if (baseAbiVersionCode != null) {
315 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
316 } else {
317 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + 16
318 }
319 }
320
321 }
322}