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 conversationsFreeCompatImplementation
25 quicksyFreeCompatImplementation
26 quicksyImplementation
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 conversationsFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
50 quicksyFreeCompatImplementation "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 quicksyImplementation '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 buildConfigField "String", "LOGTAG", "\"conversations\""
84 }
85
86 dataBinding {
87 enabled true
88 }
89
90 dexOptions {
91 // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
92 preDexLibraries = preDexEnabled && !travisBuild
93 jumboMode true
94 }
95
96 compileOptions {
97 sourceCompatibility JavaVersion.VERSION_1_8
98 targetCompatibility JavaVersion.VERSION_1_8
99 }
100
101 flavorDimensions("mode", "distribution", "emoji")
102
103 productFlavors {
104
105 quicksy {
106 dimension "mode"
107 applicationId = "im.quicksy.client"
108 resValue "string", "app_name", "Quicksy"
109 resValue "string", "applicationId", applicationId
110 buildConfigField "String", "LOGTAG", "\"quicksy\""
111 }
112
113 conversations {
114 dimension "mode"
115 }
116
117 playstore {
118 dimension "distribution"
119 versionNameSuffix "+p"
120 }
121 free {
122 dimension "distribution"
123 versionNameSuffix "+f"
124 }
125 system {
126 dimension "emoji"
127 versionNameSuffix "s"
128 }
129 compat {
130 dimension "emoji"
131 versionNameSuffix "c"
132 }
133 }
134
135 sourceSets {
136 quicksyFreeCompat {
137 java {
138 srcDirs 'src/freeCompat/java'
139 }
140 }
141 quicksyPlaystoreCompat {
142 java {
143 srcDirs 'src/playstoreCompat/java'
144 }
145 res {
146 srcDir 'src/playstoreCompat/res'
147 }
148 }
149 conversationsFreeCompat {
150 java {
151 srcDirs 'src/freeCompat/java'
152 }
153 }
154 conversationsPlaystoreCompat {
155 java {
156 srcDirs 'src/playstoreCompat/java'
157 }
158 res {
159 srcDir 'src/playstoreCompat/res'
160 }
161 }
162 }
163
164 buildTypes {
165 release {
166 shrinkResources true
167 minifyEnabled true
168 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
169 versionNameSuffix "r"
170 }
171 debug {
172 shrinkResources true
173 minifyEnabled true
174 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
175 versionNameSuffix "d"
176 }
177 }
178
179
180
181 if (new File("signing.properties").exists()) {
182 Properties props = new Properties()
183 props.load(new FileInputStream(file("signing.properties")))
184
185 signingConfigs {
186 release {
187 storeFile file(props['keystore'])
188 storePassword props['keystore.password']
189 keyAlias props['keystore.alias']
190 keyPassword props['keystore.password']
191 }
192 }
193 buildTypes.release.signingConfig = signingConfigs.release
194 }
195
196 lintOptions {
197 disable 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
198 }
199
200 subprojects {
201
202 afterEvaluate {
203 if (getPlugins().hasPlugin('android') ||
204 getPlugins().hasPlugin('android-library')) {
205
206 configure(android.lintOptions) {
207 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
208 }
209 }
210
211 }
212 }
213
214 packagingOptions {
215 exclude 'META-INF/BCKEY.DSA'
216 exclude 'META-INF/BCKEY.SF'
217 }
218}