| /* | |
| * Copyright (C) 2023 The Android Open Source Project | |
| * | |
| * 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. | |
| */ | |
| plugins { | |
| id 'com.android.application' | |
| id 'jacoco' | |
| id 'aaosApps.buildLogic' | |
| } | |
| android { | |
| namespace = "com.android.car.calendar" | |
| defaultConfig { | |
| applicationId 'com.android.car.calendar' | |
| minSdkVersion 28 | |
| targetSdkVersion 34 | |
| testInstrumentationRunnerArguments clearPackageData: 'true', coverage: 'true' | |
| } | |
| signingConfigs { | |
| unbundled { | |
| storeFile file(gradle.ext.unbundledCertPath) | |
| storePassword 'carapps' | |
| keyAlias 'carapps' | |
| keyPassword 'carapps' | |
| } | |
| } | |
| flavorDimensions 'devMode' | |
| productFlavors { | |
| unbundled { | |
| dimension 'devMode' | |
| signingConfig signingConfigs.unbundled | |
| } | |
| } | |
| sourceSets { | |
| main { | |
| manifest.srcFile 'AndroidManifest.xml' | |
| java.srcDirs = ['src'] | |
| res.srcDirs = ['res'] | |
| } | |
| androidTest.setRoot('tests') | |
| androidTest.java.srcDirs = ['tests/unit/src', 'tests/ui/src'] | |
| } | |
| testOptions { | |
| animationsDisabled = true | |
| } | |
| buildTypes { | |
| debug { | |
| testCoverageEnabled = true | |
| signingConfig android.buildTypes.release.signingConfig | |
| } | |
| release { | |
| minifyEnabled false | |
| } | |
| } | |
| // Disable release build for fake and emulator build | |
| variantFilter { variant -> | |
| def names = variant.flavors*.name | |
| if (variant.buildType.name == 'release') { | |
| if (names.contains('fake') || names.contains('emulator')) { | |
| setIgnore(true) | |
| } | |
| } | |
| } | |
| lintOptions { | |
| // Ignore duplicate resources due to existence of overlayable.xml | |
| ignore 'DuplicateDefinition' | |
| // Ignore protected permissions since Dialer is system app | |
| ignore 'ProtectedPermissions' | |
| // Ignore ImageView using android:tint | |
| ignore 'UseAppTint' | |
| // Ignore quantity errors for translations | |
| ignore 'MissingQuantity' | |
| ignore 'ImpliedQuantity' | |
| // Ignore missing translations | |
| ignore 'MissingTranslation' | |
| // Ignore error when a translated string/plural is removed | |
| ignore 'MissingDefaultResource' | |
| abortOnError false | |
| } | |
| useLibrary 'android.test.mock' | |
| } | |
| dependencies { | |
| implementation files(gradle.ext.lib_car_system_stubs) | |
| implementation project(':car-ui-lib') | |
| implementation libs.androidx.appcompat | |
| implementation libs.androidx.lifecycle.common.java8 | |
| implementation libs.androidx.lifecycle.livedata | |
| implementation libs.guava | |
| //Test libs | |
| androidTestImplementation project(':car-ui-lib-testing') | |
| androidTestImplementation libs.androidx.junit | |
| androidTestImplementation libs.androidx.test.core | |
| androidTestImplementation libs.androidx.test.runner | |
| androidTestImplementation libs.androidx.test.rules | |
| androidTestImplementation libs.androidx.espresso.core | |
| androidTestImplementation libs.androidx.espresso.contrib | |
| androidTestImplementation libs.androidx.espresso.intents | |
| androidTestImplementation libs.google.truth | |
| androidTestImplementation libs.dexmaker.mockito.inline.extended | |
| androidTestImplementation libs.hamcrest | |
| } |