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