1// 2// Copyright (C) 2019 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 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "external_libtextclassifier_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["external_libtextclassifier_license"], 24} 25 26java_library { 27 name: "TextClassifierServiceTestingLib", 28 29 sdk_version: "test_current", 30 31 srcs: [ 32 "src/com/android/textclassifier/testing/*.java", 33 ], 34 35 static_libs: [ 36 "androidx.test.ext.junit", 37 "androidx.test.rules", 38 "TextClassifierServiceLib", 39 "androidx.test.espresso.core", 40 "mockito-target-minus-junit4", 41 "compatibility-device-util-axt", 42 ], 43} 44 45android_test { 46 name: "TextClassifierServiceTest", 47 48 manifest: "AndroidManifest.xml", 49 50 srcs: [ 51 "src/**/*.java", 52 ], 53 54 exclude_srcs: [ 55 "src/**/ModelDownloaderIntegrationTest.java", 56 "src/com/android/textclassifier/testing/*.java", 57 ], 58 59 60 static_libs: [ 61 "androidx.test.ext.junit", 62 "androidx.test.espresso.core", 63 "androidx.test.ext.truth", 64 "mockito-target-minus-junit4", 65 "testng", 66 "compatibility-device-util-axt", 67 "androidx.room_room-runtime", 68 "TextClassifierServiceLib", 69 "statsdprotolite", 70 "textclassifierprotoslite", 71 "TextClassifierCoverageLib", 72 "androidx.work_work-testing", 73 "TextClassifierServiceTestingLib", 74 ], 75 76 jni_libs: [ 77 "libtextclassifier", 78 "libdexmakerjvmtiagent" 79 ], 80 81 test_suites: [ 82 "general-tests", "mts-extservices" 83 ], 84 85 plugins: ["androidx.room_room-compiler-plugin",], 86 min_sdk_version: "30", 87 sdk_version: "system_current", 88 use_embedded_native_libs: true, 89 compile_multilib: "both", 90 91 instrumentation_for: "TextClassifierService", 92 93 data: ["testdata/*"], 94 95 test_config: "AndroidTest.xml", 96} 97 98android_test { 99 name: "TCSModelDownloaderIntegrationTest", 100 101 manifest: "AndroidManifest_TCSModelDownloaderIntegrationTest.xml", 102 103 srcs: [ 104 "src/**/ModelDownloaderIntegrationTest.java", 105 ], 106 107 static_libs: [ 108 "androidx.test.ext.junit", 109 "androidx.test.espresso.core", 110 "androidx.test.ext.truth", 111 "TextClassifierServiceTestingLib", 112 ], 113 114 jni_libs: [ 115 "libtextclassifier", 116 ], 117 118 test_suites: [ 119 "general-tests" 120 ], 121 122 min_sdk_version: "30", 123 sdk_version: "system_current", 124 125 test_config: "AndroidTest_TCSModelDownloaderIntegrationTest.xml", 126} 127