1// Top-level build file where you can add configuration options common to all
2// sub-projects/modules.
3buildscript {
4 repositories {
5 google()
6 jcenter()
7 }
8 dependencies {
9 classpath 'com.android.tools.build:gradle:3.2.1'
10 }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16 google()
17 jcenter()
18 mavenCentral()
19}
20
21configurations {
22 playstoreImplementation
23 compatImplementation
24 fullFreeCompatImplementation
25 quickFreeCompatImplementation
26}
27
28ext {
29 supportLibVersion = '28.0.0'
30}
31
32dependencies {
33 playstoreImplementation('com.google.firebase:firebase-messaging:15.0.2') {
34 exclude group: 'com.google.firebase', module: 'firebase-core'
35 }
36 implementation 'org.sufficientlysecure:openpgp-api:10.0'
37 implementation ('com.theartofdev.edmodo:android-image-cropper:2.7.+') {
38 exclude group: 'com.android.support', module: 'appcompat-v7'
39 exclude group: 'com.android.support', module: 'exifinterface'
40 }
41 implementation "com.android.support:support-v13:$supportLibVersion"
42 implementation "com.android.support:appcompat-v7:$supportLibVersion"
43 implementation "com.android.support:exifinterface:$supportLibVersion"
44 implementation "com.android.support:cardview-v7:$supportLibVersion"
45 implementation "com.android.support:support-emoji:$supportLibVersion"
46 implementation "com.android.support:design:$supportLibVersion"
47 compatImplementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
48 fullFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
49 quickFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
50 implementation 'org.bouncycastle:bcmail-jdk15on:1.58'
51 implementation 'com.google.zxing:core:3.3.0'
52 implementation 'de.measite.minidns:minidns-hla:0.2.4'
53 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
54 implementation 'org.whispersystems:signal-protocol-java:2.6.2'
55 implementation 'com.makeramen:roundedimageview:2.3.0'
56 implementation "com.wefika:flowlayout:0.4.1"
57 implementation 'net.ypresto.androidtranscoder:android-transcoder:0.2.0'
58 implementation 'rocks.xmpp:xmpp-addr:0.8.0'
59 implementation 'org.osmdroid:osmdroid-android:6.0.1'
60 implementation 'org.hsluv:hsluv:0.2'
61 implementation 'org.conscrypt:conscrypt-android:1.3.0'
62}
63
64ext {
65 travisBuild = System.getenv("TRAVIS") == "true"
66 preDexEnabled = System.getProperty("pre-dex", "true")
67}
68
69android {
70 compileSdkVersion 28
71
72 defaultConfig {
73 minSdkVersion 19
74 targetSdkVersion 25
75 versionCode 297
76 versionName "2.3.5"
77 archivesBaseName += "-$versionName"
78 applicationId "eu.siacs.conversations"
79 resValue "string", "applicationId", applicationId
80 resValue "string", "app_name", "Conversations"
81 }
82
83 dataBinding {
84 enabled true
85 }
86
87 dexOptions {
88 // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
89 preDexLibraries = preDexEnabled && !travisBuild
90 jumboMode true
91 }
92
93 compileOptions {
94 sourceCompatibility JavaVersion.VERSION_1_8
95 targetCompatibility JavaVersion.VERSION_1_8
96 }
97
98 flavorDimensions("mode", "distribution", "emoji")
99
100 productFlavors {
101
102 quick {
103 dimension "mode"
104 applicationId = "im.conversations.quick"
105 resValue "string", "app_name", "Quick Conversations"
106 resValue "string", "applicationId", applicationId
107 }
108
109 full {
110 dimension "mode"
111 }
112
113 playstore {
114 dimension "distribution"
115 versionNameSuffix "+p"
116 }
117 free {
118 dimension "distribution"
119 versionNameSuffix "+f"
120 }
121 system {
122 dimension "emoji"
123 versionNameSuffix "s"
124 }
125 compat {
126 dimension "emoji"
127 versionNameSuffix "c"
128 }
129 }
130
131 sourceSets {
132 quickFreeCompat {
133 java {
134 srcDirs 'src/freeCompat/java'
135 }
136 }
137 quickPlaystoreCompat {
138 java {
139 srcDirs 'src/playstoreCompat/java'
140 }
141 res {
142 srcDir 'src/playstoreCompat/res'
143 }
144 }
145 fullFreeCompat {
146 java {
147 srcDirs 'src/freeCompat/java'
148 }
149 }
150 fullPlaystoreCompat {
151 java {
152 srcDirs 'src/playstoreCompat/java'
153 }
154 res {
155 srcDir 'src/playstoreCompat/res'
156 }
157 }
158 }
159
160 buildTypes {
161 release {
162 shrinkResources true
163 minifyEnabled true
164 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
165 versionNameSuffix "r"
166 }
167 debug {
168 shrinkResources true
169 minifyEnabled true
170 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
171 versionNameSuffix "d"
172 }
173 }
174
175
176
177 if (new File("signing.properties").exists()) {
178 Properties props = new Properties()
179 props.load(new FileInputStream(file("signing.properties")))
180
181 signingConfigs {
182 release {
183 storeFile file(props['keystore'])
184 storePassword props['keystore.password']
185 keyAlias props['keystore.alias']
186 keyPassword props['keystore.password']
187 }
188 }
189 buildTypes.release.signingConfig = signingConfigs.release
190 }
191
192 lintOptions {
193 disable 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
194 }
195
196 subprojects {
197
198 afterEvaluate {
199 if (getPlugins().hasPlugin('android') ||
200 getPlugins().hasPlugin('android-library')) {
201
202 configure(android.lintOptions) {
203 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
204 }
205 }
206
207 }
208 }
209
210 packagingOptions {
211 exclude 'META-INF/BCKEY.DSA'
212 exclude 'META-INF/BCKEY.SF'
213 }
214}