forked from bryant1410/Atlas-Android-Messenger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
48 lines (42 loc) · 1.47 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
// Setting version to be used for TestButler, which is there to help the emulator on
// CI system not cause random failures
ext {
testButler = '1.3.1'
}
allprojects {
repositories {
maven { url "https://raw.githubusercontent.com/layerhq/releases-android/master/releases/" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Disable preDexing for builds on CI systems, since the repo is freshly cloned and will be gone
// again after the tests are done. Speeds up builds on CI.
project.ext {
if (project.hasProperty('preDexEnabled')) {
project.ext.preDexLibs = project.properties['preDexEnabled'].equals('true')
} else {
project.ext.preDexLibs = true // pre dexing should be true by default
}
println('PREDEX ' + (project.ext.preDexLibs ? 'ENABLED' : 'DISABLED')) // goes to build log or console output
}
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}