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