1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// Top-level build file where you can add configuration options common to all sub-projects/modules.
18
19buildscript {
20    repositories {
21        google()
22        jcenter()
23    }
24
25    dependencies {
26        classpath 'com.android.tools.build:gradle:3.5.3'
27
28        // NOTE: Do not place your application dependencies here; they belong
29        // in the individual module build.gradle files
30    }
31}
32
33allprojects {
34    repositories {
35        google()
36        jcenter()
37    }
38}
39
40// Library-level build file
41
42apply plugin: 'com.android.library'
43
44android {
45    compileSdkVersion 28
46
47    defaultConfig {
48        minSdkVersion 28
49        targetSdkVersion 28
50        versionCode 1
51        versionName "1.0"
52    }
53
54    compileOptions {
55        sourceCompatibility JavaVersion.VERSION_1_8
56        targetCompatibility JavaVersion.VERSION_1_8
57    }
58
59    sourceSets {
60        main {
61            manifest.srcFile 'AndroidManifest.xml'
62            res.srcDirs = ['res']
63        }
64
65        test {
66            java.srcDirs = ['src']
67        }
68    }
69
70    testOptions {
71        unitTests {
72            includeAndroidResources = true
73        }
74    }
75}
76
77dependencies {
78    implementation project(':')
79    testImplementation "androidx.test.ext:junit:1.1.1"
80    testImplementation "org.robolectric:robolectric:4.0-alpha-3"
81    testImplementation "org.mockito:mockito-core:2.19.0"
82    testImplementation "com.google.truth:truth:0.29"
83    testImplementation "org.testng:testng:6.9.9"
84
85    // This is the gradle equivalent of linking to android.car in our Android.mk
86    implementation files('../../../../../../../out/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/classes.jar')
87}
88