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