1// Copyright (C) 2024 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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19java_library_host { 20 name: "PhotopickerLintChecker", 21 srcs: [ 22 "checks/src/**/*.kt", 23 ], 24 static_libs: [ 25 "dagger2", 26 ], 27 plugins: ["auto_service_plugin"], 28 libs: [ 29 "auto_service_annotations", 30 "lint_api", 31 ], 32 kotlincflags: ["-Xjvm-default=all"], 33} 34 35java_test_host { 36 name: "PhotopickerLintCheckerTest", 37 srcs: [ 38 "checks/tests/**/*.kt", 39 ], 40 static_libs: [ 41 "PhotopickerLintChecker", 42 "junit", 43 "lint", 44 "lint_tests", 45 ], 46 test_options: { 47 unit_test: true, 48 tradefed_options: [ 49 { 50 // lint bundles in some classes that were built with older versions 51 // of libraries, and no longer load. Since tradefed tries to load 52 // all classes in the jar to look for tests, it crashes loading them. 53 // Exclude these classes from tradefed's search. 54 name: "exclude-paths", 55 value: "org/apache", 56 }, 57 { 58 name: "exclude-paths", 59 value: "META-INF", 60 }, 61 ], 62 }, 63} 64