aboutsummaryrefslogtreecommitdiff
path: root/app/build.gradle
blob: c963ac4b5bc22157ac7f8b5eca2528dd0db53a24 (plain)
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
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"

    defaultConfig {
        applicationId "org.traccar.manager"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 13
        versionName "2.3"
    }

    productFlavors {
        regular
        google
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }
}

dependencies {
    compile 'com.android.support:design:26.0.1'
    testCompile 'junit:junit:4.12'
    testCompile 'org.robolectric:robolectric:3.0'
    googleCompile 'com.google.firebase:firebase-core:11.2.0'
    googleCompile 'com.google.firebase:firebase-crash:11.2.0'
}

if (getGradle().getStartParameter().getTaskRequests().toString().contains("Google")) {
    apply plugin: 'com.google.gms.google-services'

    task copyJson(type: Copy) {
        from '../../traccar-shared/google-services'
        into '.'
        include 'traccar-manager-android.json'
        rename('traccar-manager-android.json', 'google-services.json')
    }

    afterEvaluate {
        preBuild.dependsOn copyJson
    }
}