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