1/* 2 * Copyright (C) 2020 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 29 46 47 defaultConfig { 48 minSdkVersion 28 49 targetSdkVersion 29 50 versionCode 1 51 versionName "1.0" 52 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 53 } 54 55 compileOptions { 56 sourceCompatibility JavaVersion.VERSION_1_8 57 targetCompatibility JavaVersion.VERSION_1_8 58 } 59 60 sourceSets { 61 main { 62 manifest.srcFile 'AndroidManifest.xml' 63 res.srcDirs = ['res'] 64 } 65 66 androidTest { 67 java.srcDirs = ['src'] 68 } 69 } 70 71 testOptions { 72 unitTests { 73 includeAndroidResources = true 74 } 75 } 76} 77 78dependencies { 79 implementation project(':') 80 81 androidTestImplementation 'org.hamcrest:hamcrest-library:1.3' 82 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 83 androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0' 84 androidTestImplementation "com.google.truth:truth:0.29" 85 androidTestImplementation "androidx.test.ext:junit:1.1.1" 86 androidTestImplementation "org.mockito:mockito-core:2.19.0" 87 androidTestImplementation 'androidx.test:runner:1.1.0' 88 androidTestImplementation 'androidx.test:rules:1.1.0' 89 90 // This is needed to be able to spy certain classes with Mockito 91 // It's major/minor version must match Mockito's. 92 androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.19.0' 93 94 // This is the gradle equivalent of linking to android.car in our Android.mk 95 implementation files('../../../../../../../out/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/classes.jar') 96} 97