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