-
Notifications
You must be signed in to change notification settings - Fork 238
/
build.gradle
208 lines (191 loc) · 5.13 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'org.ajoberstar:grgit:1.1.0'
// https://github.com/Triple-T/gradle-play-publisher#usage
classpath 'com.github.triplet.gradle:play-publisher:2.4.1'
}
}
plugins {
// obtain revision from git
id 'org.ajoberstar.grgit' version '1.6.0'
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
}
}
/////////////// yaxim specific build rules ///////////////
apply plugin: 'com.android.application'
apply plugin: 'com.github.triplet.play'
// gradle rule to download sources for AS (because AS can't on its own)
// run as: `gradle cleanIdea idea`
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
ext {
build_date = "${new Date().format('yyyy-MM-dd')}"
build_revision = "${grgit.describe()}"
build_version = "yaxim ${build_revision} ${build_date}"
}
task buildVersion (type: Copy) {
from("template") {
include "version.xml"
expand( build_date: build_date,
build_revision: build_revision,
build_version: build_version)
}
into("res/values")
outputs.upToDateWhen {
false
}
}
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
useLibrary 'org.apache.http.legacy'
flavorDimensions ("style", "distribution")
defaultConfig {
applicationId "org.yaxim"
minSdkVersion 14
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 28
versionName "$build_revision"
vectorDrawables.useSupportLibrary = true
}
if (project.hasProperty("RELEASE_KEY_ALIAS")) {
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
productFlavors {
yaxim {
dimension "style"
applicationIdSuffix "androidclient"
}
bruno {
dimension "style"
applicationIdSuffix "bruno"
}
play {
dimension "distribution"
}
free {
dimension "distribution"
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
yaxim {
java.srcDirs = ['yaxim/src']
res.srcDirs = ['yaxim/res']
assets.srcDirs = ['yaxim/assets']
}
bruno {
java.srcDirs = ['bruno/src']
res.srcDirs = ['bruno/res']
assets.srcDirs = ['bruno/assets']
}
play {
manifest.srcFile 'play/AndroidManifest.xml'
java.srcDirs = ['play/src']
res.srcDirs = ['play/res']
assets.srcDirs = ['play/assets']
}
free {
java.srcDirs = ['free/src']
}
}
lintOptions {
disable 'MissingTranslation'
}
}
play {
serviceAccountCredentials = file('play-publish-credentials.json')
track = 'beta'
}
dependencies {
def SMACK_VERSION = "4.3.5-SNAPSHOT"
// Google Push via FCM
playImplementation('com.google.firebase:firebase-messaging:17.3.4') {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
}
implementation 'com.android.support:appcompat-v7:28.0.0'
// implicit compile 'com.android.support:support-v4:25.+'
implementation project('MemorizingTrustManager')
api fileTree(include: ['*.jar'], dir: 'libs')
api fileTree(include: ['*.aar'], dir: 'libs')
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
implementation 'org.hsluv:hsluv:0.2'
implementation 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
implementation 'com.google.zxing:core:3.3.3'
// play referrer
playImplementation 'com.android.installreferrer:installreferrer:1.1'
// smack4
//compile project("Smack:smack-android-extensions")
//compile project("Smack:smack-tcp")
//compile project("Smack:smack-im")
//// for Carbons, and other
//compile project("Smack:smack-experimental")
implementation 'org.jxmpp:jxmpp-jid:0.6.4-SNAPSHOT'
implementation "org.igniterealtime.smack:smack-android-extensions:$SMACK_VERSION"
implementation "org.igniterealtime.smack:smack-tcp:$SMACK_VERSION"
implementation "org.igniterealtime.smack:smack-im:$SMACK_VERSION"
// for Carbons, and other
implementation "org.igniterealtime.smack:smack-experimental:$SMACK_VERSION"
}
// for smack4
configurations {
all*.exclude group: 'xpp3', module: 'xpp3'
}
preBuild.dependsOn buildVersion
// required to fill applicationId into prefs XML files
afterEvaluate {
android.applicationVariants.all { variant ->
variant.resValue 'string', 'application_id', variant.applicationId
}
}