• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16// Library-level build file
17
18apply plugin: 'com.android.library'
19
20buildscript {
21    repositories {
22        mavenCentral()
23    }
24}
25
26android {
27    compileSdkVersion 30
28
29    defaultConfig {
30        minSdkVersion 28
31        targetSdkVersion 30
32        versionCode 1
33        versionName "1.0"
34        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35    }
36
37    compileOptions {
38        sourceCompatibility JavaVersion.VERSION_1_8
39        targetCompatibility JavaVersion.VERSION_1_8
40    }
41
42    sourceSets {
43        main {
44            manifest.srcFile 'AndroidManifest-gradle.xml'
45            res.srcDirs = ['res']
46            java.srcDirs = ['src']
47        }
48
49        test {
50            manifest.srcFile 'tests/robotests/AndroidManifest.xml'
51            res.srcDirs += ['tests/robotests/res','tests/robotests/config']
52            java.srcDirs = ['tests/robotests/src']
53        }
54    }
55
56    android {
57        lintOptions {
58            abortOnError false
59        }
60    }
61
62    testOptions {
63        unitTests {
64            includeAndroidResources = true
65        }
66    }
67}
68
69dependencies {
70    implementation files('../../../../../../prebuilts/sdk/30/system/android.car-system-stubs.jar')
71
72    implementation 'androidx.car:car:1.0.0-alpha7'
73    implementation 'androidx.appcompat:appcompat:1.2.0'
74    implementation 'androidx.cardview:cardview:1.0.0'
75    implementation 'androidx.recyclerview:recyclerview:1.2.0'
76    implementation 'androidx.gridlayout:gridlayout:1.0.0'
77    implementation 'androidx.preference:preference:1.1.1'
78    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
79    implementation 'androidx.core:core:1.3.2'
80    implementation 'androidx.annotation:annotation:1.2.0'
81    implementation 'androidx.test:core:1.4.0'
82
83    testImplementation 'com.google.truth:truth:0.41'
84    testImplementation 'org.mockito:mockito-core:3.6.0'
85    testImplementation 'org.robolectric:robolectric:4.8.2'
86}
87