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.0.1'
10 }
11}
12
13apply plugin: 'com.android.application'
14
15repositories {
16 jcenter()
17 mavenCentral()
18 maven {
19 url 'https://maven.google.com'
20 }
21 maven {
22 url "https://jitpack.io"
23 }
24 maven {
25 url "https://oss.sonatype.org/content/repositories/snapshots"
26 }
27}
28
29configurations {
30 playstoreImplementation
31 freeImplementation
32}
33
34ext {
35 supportLibVersion = '27.1.0'
36}
37
38dependencies {
39 implementation project(':libs:EnhancedListView')
40 playstoreImplementation 'com.google.android.gms:play-services-gcm:11.8.0'
41 implementation 'org.sufficientlysecure:openpgp-api:10.0'
42 implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
43 implementation "com.android.support:support-v13:$supportLibVersion"
44 implementation "com.android.support:appcompat-v7:$supportLibVersion"
45 implementation "com.android.support:cardview-v7:$supportLibVersion"
46 implementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
47 implementation "com.android.support:support-emoji:$supportLibVersion"
48 implementation "com.android.support:design:$supportLibVersion"
49 freeImplementation "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.21@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-SNAPSHOT'
59}
60
61ext {
62 travisBuild = System.getenv("TRAVIS") == "true"
63 preDexEnabled = System.getProperty("pre-dex", "true")
64}
65
66android {
67 compileSdkVersion 27
68 buildToolsVersion "27.0.3"
69
70 defaultConfig {
71 minSdkVersion 19
72 targetSdkVersion 25
73 versionCode 260
74 versionName "2.0.0-rc.1"
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")
97
98 productFlavors {
99 playstore {
100 dimension "distribution"
101 }
102 free {
103 dimension "distribution"
104 }
105 }
106
107 buildTypes {
108 release {
109 shrinkResources true
110 minifyEnabled true
111 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
112 }
113 debug {
114 shrinkResources true
115 minifyEnabled true
116 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
117 }
118 }
119
120
121
122 if(new File("signing.properties").exists()) {
123 Properties props = new Properties()
124 props.load(new FileInputStream(file("signing.properties")))
125
126 signingConfigs {
127 release {
128 storeFile file(props['keystore'])
129 storePassword props['keystore.password']
130 keyAlias props['keystore.alias']
131 keyPassword props['keystore.password']
132 }
133 }
134 buildTypes.release.signingConfig = signingConfigs.release
135 }
136
137 lintOptions {
138 disable 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
139 }
140
141 subprojects {
142
143 afterEvaluate {
144 if (getPlugins().hasPlugin('android') ||
145 getPlugins().hasPlugin('android-library')) {
146
147 configure(android.lintOptions) {
148 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
149 }
150 }
151
152 }
153 }
154
155 packagingOptions {
156 exclude 'META-INF/BCKEY.DSA'
157 exclude 'META-INF/BCKEY.SF'
158 }
159}