build.gradle 1.44 KB
Newer Older
1 2 3 4
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
5
        google()
6
        jcenter()
7
        mavenCentral()
8 9
    }
    dependencies {
10
        classpath 'com.android.tools.build:gradle:3.1.4'
11

12 13 14
        // Specified as going here by the Analytics instructions.
        classpath 'com.google.gms:google-services:2.0.0-alpha6'

15 16 17
        // the latest version of the android-apt plugin
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'

18 19 20 21 22 23 24
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
25
        google()
26 27 28 29 30 31 32
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Sean Barbeau's avatar
Sean Barbeau committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
/**
 * Improve build server performance by allowing disabling of pre-dexing
 * (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
 */
project.ext.preDexLibs = !project.hasProperty('disablePreDex')

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
        }
    }
}
48 49