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