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