build.gradle 4.97 KB
Newer Older
Marvin W.'s avatar
Marvin W. committed
1
/*
Marvin W.'s avatar
Marvin W. committed
2
 * Copyright 2013-2019 microG Project Team
Marvin W.'s avatar
Marvin W. committed
3
4
5
6
7
8
9
10
11
12
13
14
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
Marvin W.'s avatar
Marvin W. committed
15
16
 */

Marvin W.'s avatar
Marvin W. committed
17
apply plugin: 'com.android.application'
18
apply plugin: 'kotlin-android'
19
apply plugin: 'kotlin-kapt'
Marvin W.'s avatar
Marvin W. committed
20

Marvin W.'s avatar
Marvin W. committed
21
configurations {
22
23
24
25
    withMapboxImplementation
    withVtmImplementation
    withNearbyImplementation
    withoutNearbyImplementation
26
27
}

Marvin W.'s avatar
Marvin W. committed
28
dependencies {
29
    implementation "com.squareup.wire:wire-runtime:$wireVersion"
30
    implementation "de.hdodenhof:circleimageview:1.3.0"
31
32
33
34
    // TODO: Switch to upstream once raw requests are merged
    // https://github.com/vitalidze/chromecast-java-api-v2/pull/99
    // implementation "su.litvak.chromecast:api-v2:0.10.4"
    implementation "info.armills.chromecast-java-api-v2:api-v2-raw-request:0.10.4-raw-request-1"
Adam Mills's avatar
Adam Mills committed
35
36
37
38
39

    // Specified manually due to
    // https://github.com/vitalidze/chromecast-java-api-v2/issues/91
    api "org.slf4j:slf4j-api:1.7.25"
    api "uk.uuid.slf4j:slf4j-android:1.7.25-1"
Marvin W.'s avatar
Marvin W. committed
40

41
    implementation project(':firebase-dynamic-links-api')
42
    implementation project(':firebase-auth-core')
Marvin W.'s avatar
Marvin W. committed
43
    implementation project(':play-services-base-core')
44
    implementation project(':play-services-base-core-ui')
45
    implementation project(':play-services-conscrypt-provider-core')
Marvin W.'s avatar
Marvin W. committed
46
    implementation project(':play-services-location-core')
47
    implementation project(':play-services-vision-core')
48
49
    withNearbyImplementation project(':play-services-nearby-core')
    withNearbyImplementation project(':play-services-nearby-core-ui')
50
    implementation project(':play-services-core-proto')
Marvin W.'s avatar
Marvin W. committed
51
    implementation project(':play-services-core:microg-ui-tools') // deprecated
52
    implementation project(':play-services-api')
53
    implementation project(':play-services-cast-api')
54
    implementation project(':play-services-wearable')
Marvin W.'s avatar
Marvin W. committed
55
56
    implementation "org.microg:wearable:$wearableVersion"
    implementation "org.microg.gms:remote-droid-guard:$remoteDroidGuardVersion"
Marvin W.'s avatar
Marvin W. committed
57

58
59
    withMapboxImplementation project(':play-services-maps-core-mapbox')
    withVtmImplementation project(':play-services-maps-core-vtm')
Marvin W.'s avatar
Marvin W. committed
60
61
62
63
64

    // AndroidX UI
    implementation "androidx.multidex:multidex:$multidexVersion"
    implementation "androidx.appcompat:appcompat:$appcompatVersion"
    implementation "androidx.mediarouter:mediarouter:$mediarouterVersion"
65
    implementation "androidx.preference:preference-ktx:$preferenceVersion"
Marvin W.'s avatar
Marvin W. committed
66
    implementation "androidx.webkit:webkit:$webkitVersion"
Marvin W.'s avatar
Marvin W. committed
67

Marvin W.'s avatar
Marvin W. committed
68
69
70
    // Navigation
    implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
    implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
71

Marvin W.'s avatar
Marvin W. committed
72
73
    implementation "com.android.volley:volley:$volleyVersion"

74
    implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
75
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
Marvin W.'s avatar
Marvin W. committed
76
77
}

Marvin W.'s avatar
Marvin W. committed
78
android {
79
80
    compileSdkVersion androidCompileSdk()
    buildToolsVersion "$androidBuildVersionTools"
Marvin W.'s avatar
Marvin W. committed
81

Marvin W.'s avatar
Marvin W. committed
82
    defaultConfig {
Marvin W.'s avatar
Marvin W. committed
83
        versionName version
Marvin W.'s avatar
Marvin W. committed
84
        versionCode appVersionCode
Marvin W.'s avatar
Marvin W. committed
85

Marvin W.'s avatar
Marvin W. committed
86
87
88
        minSdkVersion androidMinSdk
        targetSdkVersion androidTargetSdk

Marvin W.'s avatar
Marvin W. committed
89
        multiDexEnabled true
Marvin W.'s avatar
Marvin W. committed
90
        multiDexKeepProguard file('multidex-keep.pro')
Marvin W.'s avatar
Marvin W. committed
91

Marvin W.'s avatar
Marvin W. committed
92
        ndk {
Marvin W.'s avatar
Marvin W. committed
93
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
Marvin W.'s avatar
Marvin W. committed
94
        }
Marvin W.'s avatar
Marvin W. committed
95
96
    }

Marvin W.'s avatar
Marvin W. committed
97
98
    buildFeatures {
        dataBinding = true
Marvin W.'s avatar
Marvin W. committed
99
100
    }

Marvin W.'s avatar
Marvin W. committed
101
102
    sourceSets {
        main {
103
            java.srcDirs += 'src/main/kotlin'
Marvin W.'s avatar
Marvin W. committed
104
        }
105
106
107
108
109
110
        withNearby {
            java.srcDirs += 'src/withNearby/kotlin'
        }
        withoutNearby {
            java.srcDirs += 'src/withoutNearby/kotlin'
        }
Marvin W.'s avatar
Marvin W. committed
111
    }
112

113
    lintOptions {
114
        disable 'MissingTranslation', 'InvalidPackage', 'BatteryLife', 'ImpliedQuantity', 'MissingQuantity', 'InvalidWakeLockTag'
115
    }
116

Marvin W.'s avatar
Marvin W. committed
117
118
    buildTypes {
        release {
Marvin W.'s avatar
Marvin W. committed
119
            minifyEnabled false
Marvin W.'s avatar
Marvin W. committed
120
121
122
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
123

124
    flavorDimensions 'maps', 'nearby'
Marvin W.'s avatar
Marvin W. committed
125
    productFlavors {
126
        withMapbox {
Marvin W.'s avatar
Marvin W. committed
127
128
            dimension 'maps'
        }
129
        withVtm {
Marvin W.'s avatar
Marvin W. committed
130
131
132
            dimension 'maps'
            versionNameSuffix '-vtm'
        }
133
134
135
136
137
138
139
        withNearby {
            dimension 'nearby'
        }
        withoutNearby {
            dimension 'nearby'
            versionNameSuffix '-noen'
        }
Marvin W.'s avatar
Marvin W. committed
140
141
    }

142
143
144
145
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
Adam Mills's avatar
Adam Mills committed
146
147
148
149

    packagingOptions {
        exclude 'META-INF/ASL2.0'
    }
Marvin W.'s avatar
Marvin W. committed
150
151
152
153
154
}

if (file('user.gradle').exists()) {
    apply from: 'user.gradle'
}