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