1/* 2 * Copyright (C) 2024 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 17plugins { 18 id 'com.android.library' 19 id 'kotlin-android' 20 id 'aconfig' 21} 22 23aconfig { 24 aconfigDeclaration { 25 packageName.set("com.android.car.dockutil") 26 srcFile.setFrom(files("dock_flags.aconfig")) 27 } 28} 29 30android { 31 namespace 'com.android.car.dockutil' 32 compileSdk gradle.ext.aaosTargetSDK 33 34 defaultConfig { 35 minSdk gradle.ext.aaosLatestSDK 36 targetSdk gradle.ext.aaosLatestSDK 37 versionCode gradle.ext.getVersionCode() 38 versionName gradle.ext.getVersionName() 39 40 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 41 } 42 43 kotlinOptions { 44 jvmTarget = '1.8' 45 } 46 47 sourceSets { 48 main { 49 manifest.srcFile 'AndroidManifest.xml' 50 res.srcDirs = ['res'] 51 java.srcDirs = ['src'] 52 } 53 54 androidTest { 55 java.srcDirs += 'tests/src' 56 } 57 } 58 59 testOptions { 60 unitTests { 61 includeAndroidResources = true 62 returnDefaultValues = true 63 } 64 } 65 66 compileOptions { 67 sourceCompatibility JavaVersion.VERSION_1_8 68 targetCompatibility JavaVersion.VERSION_1_8 69 } 70 71 lintOptions { 72 disable 'PrivateResource' 73 } 74} 75 76dependencies { 77 implementation project(":libs:hidden-apis-compat:hidden-apis-disabled") 78 implementation 'androidx.annotation:annotation:1.7.1' 79 80 //Android Test dependencies 81 androidTestImplementation project(":libs:hidden-apis-compat:hidden-apis-disabled") 82 androidTestImplementation 'junit:junit:4.13.2' 83 androidTestImplementation "org.mockito:mockito-android:5.10.0" 84 androidTestImplementation "org.mockito:mockito-core:5.10.0" 85 androidTestImplementation "org.mockito.kotlin:mockito-kotlin:3.2.0" 86 androidTestImplementation "androidx.test:rules:1.5.0" 87 androidTestImplementation 'androidx.test:runner:1.5.2' 88 androidTestImplementation 'androidx.test.ext:junit:1.1.5' 89 androidTestImplementation "com.google.truth:truth:1.3.0" 90} 91 92java { 93 sourceCompatibility = JavaVersion.VERSION_1_8 94 targetCompatibility = JavaVersion.VERSION_1_8 95} 96