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 'org.bouncycastle:bcpg-jdk18on:1.78.1'
83 implementation 'com.google.zxing:core:3.5.3'
84 implementation 'org.minidns:minidns-hla:1.1.1'
85 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
86 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
87 implementation "com.wefika:flowlayout:0.4.1"
88
89 //noinspection GradleDependency
90 implementation('com.github.natario1:Transcoder:v0.9.1') {
91 exclude group: 'com.otaliastudios.opengl', module: 'egloo'
92 }
93 implementation 'com.github.natario1:Egloo:v0.4.0'
94
95 implementation 'org.jxmpp:jxmpp-jid:1.0.3'
96 implementation 'org.jxmpp:jxmpp-stringprep-libidn:1.0.3'
97 implementation 'org.osmdroid:osmdroid-android:6.1.11'
98 implementation 'org.hsluv:hsluv:0.2'
99 implementation 'org.conscrypt:conscrypt-android:2.5.2'
100 implementation 'me.drakeet.support:toastcompat:1.1.0'
101 implementation "com.leinardi.android:speed-dial:3.3.0"
102
103 implementation "com.squareup.retrofit2:retrofit:2.11.0"
104 implementation "com.squareup.retrofit2:converter-gson:2.11.0"
105 implementation "com.squareup.okhttp3:okhttp:4.12.0"
106
107 implementation 'com.google.guava:guava:32.1.3-android'
108 implementation 'io.michaelrocks:libphonenumber-android:8.13.35'
109 implementation 'im.conversations.webrtc:webrtc-android:129.0.0'
110 implementation 'io.github.nishkarsh:android-permissions:2.1.6'
111 implementation 'androidx.recyclerview:recyclerview:1.1.0'
112 implementation 'androidx.documentfile:documentfile:1.0.1'
113 implementation 'androidx.browser:browser:1.8.0'
114 implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'
115 implementation 'com.github.ipld:java-cid:v1.3.1'
116 //implementation 'com.splitwise:tokenautocomplete:3.0.2'
117 implementation 'com.github.singpolyma:TokenAutoComplete:bfa93780e0'
118 implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4'
119 implementation 'com.github.singpolyma:android-identicons:3361281bd4'
120 implementation 'com.github.woltapp:blurhash:master'
121 implementation 'com.caverock:androidsvg-aar:1.4'
122 implementation 'org.tomlj:tomlj:1.1.0'
123 implementation 'com.tbuonomo:dotsindicator:4.2'
124 implementation 'com.github.singpolyma:OpenGraphParser:d0882eadb2'
125 implementation 'me.xdrop:fuzzywuzzy:1.4.0'
126 implementation 'net.fellbaum:jemoji:1.4.1'
127 implementation 'com.github.natario1:Autocomplete:v1.1.0'
128 implementation 'com.mikepenz:materialdrawer:9.0.1'
129}
130
131ext {
132 preDexEnabled = System.getProperty("pre-dex", "true")
133 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
134}
135
136android {
137 namespace 'eu.siacs.conversations'
138 compileSdk 34
139
140 defaultConfig {
141 minSdkVersion 23
142 targetSdkVersion 34
143 versionCode 42025 + tags.size()
144 versionName grgit.describe(always: true)
145 applicationId "eu.siacs.conversations"
146 def appName = "Conversations"
147 resValue "string", "app_name", appName
148 buildConfigField "String", "APP_NAME", "\"$appName\"";
149 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
150 }
151
152 splits {
153 abi {
154 universalApk true
155 enable true
156 reset()
157 //noinspection ChromeOsAbiSupport
158 include project.ext.abiCodes.keySet() as String[]
159 }
160 }
161
162 configurations {
163 implementation.exclude group: 'org.jetbrains' , module:'annotations'
164 }
165
166 dataBinding {
167 enabled true
168 }
169
170 compileOptions {
171 coreLibraryDesugaringEnabled true
172 sourceCompatibility JavaVersion.VERSION_17
173 targetCompatibility JavaVersion.VERSION_17
174 }
175
176 flavorDimensions += "mode"
177 flavorDimensions += "distribution"
178
179 productFlavors {
180
181 quicksy {
182 dimension "mode"
183 applicationId = "im.quicksy.client"
184
185 def appName = "Quicksy"
186 resValue "string", "app_name", appName
187 buildConfigField "String", "APP_NAME", "\"$appName\""
188 buildConfigField "String", "PRIVACY_POLICY", "\"https://quicksy.im/privacy.htm\""
189 }
190
191 conversations {
192 dimension "mode"
193 buildConfigField "String", "PRIVACY_POLICY", "\"https://conversations.im/privacy.html\""
194 }
195
196 cheogram {
197 dimension "mode"
198
199 applicationId = "com.cheogram.android"
200
201 def appName = "Cheogram"
202 resValue "string", "app_name", appName
203 buildConfigField "String", "APP_NAME", "\"$appName\"";
204 buildConfigField "String", "PRIVACY_POLICY", "\"https://cheogram.com/android-privacy.html\""
205 }
206
207 playstore {
208 dimension "distribution"
209 versionNameSuffix "+playstore"
210 applicationIdSuffix "playstore"
211 }
212 free {
213 dimension "distribution"
214 versionNameSuffix "+free"
215 }
216 }
217
218 applicationVariants.all { variant ->
219 variant.resValue "string", "applicationId", applicationId
220 }
221
222 sourceSets {
223 quicksyFree {
224 java {
225 srcDir 'src/quicksyFree/java'
226 }
227 }
228 quicksyPlaystore {
229 java {
230 srcDir 'src/quicksyPlaystore/java'
231 }
232 res {
233 srcDir 'src/quicksyPlaystore/res'
234 }
235 }
236 conversationsFree {
237 java {
238 srcDir 'src/conversationsFree/java'
239 }
240 }
241 cheogramFree {
242 java {
243 srcDir 'src/conversationsFree/java'
244 }
245 }
246 conversationsPlaystore {
247 java {
248 srcDir 'src/conversationsPlaystore/java'
249 }
250 res {
251 srcDir 'src/conversationsPlaystore/res'
252 }
253 }
254 }
255
256 buildTypes {
257 release {
258 shrinkResources true
259 minifyEnabled true
260 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
261 ndk.debugSymbolLevel = 'full'
262 }
263 }
264
265
266 if (new File("signing.properties").exists()) {
267 Properties props = new Properties()
268 props.load(new FileInputStream(file("signing.properties")))
269
270 signingConfigs {
271 release {
272 storeFile file(props['keystore'])
273 storePassword props['keystore.password']
274 keyAlias props['keystore.alias']
275 keyPassword props['keystore.password']
276 }
277 }
278 buildTypes.release.signingConfig = signingConfigs.release
279 }
280
281 lintOptions {
282 disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
283 abortOnError false
284 }
285
286 subprojects {
287
288 afterEvaluate {
289 if (getPlugins().hasPlugin('android') ||
290 getPlugins().hasPlugin('android-library')) {
291
292 configure(android.lintOptions) {
293 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
294 abortOnError false
295 }
296 }
297
298 }
299 }
300 packagingOptions {
301 resources {
302 excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF', 'META-INF/versions/9/OSGI-INF/MANIFEST.MF']
303 }
304 }
305 lint {
306 disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
307 }
308 buildFeatures {
309 buildConfig true
310 }
311
312 android.applicationVariants.configureEach { variant ->
313 variant.outputs.each { output ->
314 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
315 if (baseAbiVersionCode != null) {
316 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
317 } else {
318 output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
319 }
320 }
321
322 }
323}