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