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 srcs: [ 30 "src/com/android/textclassifier/testing/*.java", 31 ], 32 33 static_libs: [ 34 "androidx.test.ext.junit", 35 "androidx.test.rules", 36 "TextClassifierServiceLib", 37 "androidx.test.espresso.core", 38 "mockito-target-minus-junit4", 39 ], 40} 41 42android_test { 43 name: "TextClassifierServiceTest", 44 45 manifest: "AndroidManifest.xml", 46 47 srcs: [ 48 "src/**/*.java", 49 ], 50 51 exclude_srcs: [ 52 "src/**/ModelDownloaderIntegrationTest.java", 53 "src/com/android/textclassifier/testing/*.java", 54 ], 55 56 57 static_libs: [ 58 "androidx.test.ext.junit", 59 "androidx.test.espresso.core", 60 "androidx.test.ext.truth", 61 "mockito-target-minus-junit4", 62 "ub-uiautomator", 63 "testng", 64 "compatibility-device-util-axt", 65 "androidx.room_room-runtime", 66 "TextClassifierServiceLib", 67 "statsdprotolite", 68 "textclassifierprotoslite", 69 "TextClassifierCoverageLib", 70 "androidx.work_work-testing", 71 "TextClassifierServiceTestingLib", 72 ], 73 74 jni_libs: [ 75 "libtextclassifier", 76 "libdexmakerjvmtiagent" 77 ], 78 79 test_suites: [ 80 "general-tests", "mts-extservices" 81 ], 82 83 plugins: ["androidx.room_room-compiler-plugin",], 84 min_sdk_version: "30", 85 sdk_version: "system_current", 86 use_embedded_native_libs: true, 87 compile_multilib: "both", 88 89 instrumentation_for: "TextClassifierService", 90 91 data: ["testdata/*"], 92 93 test_config: "AndroidTest.xml", 94} 95 96android_test { 97 name: "TCSModelDownloaderIntegrationTest", 98 99 manifest: "AndroidManifest_TCSModelDownloaderIntegrationTest.xml", 100 101 srcs: [ 102 "src/**/ModelDownloaderIntegrationTest.java", 103 ], 104 105 static_libs: [ 106 "androidx.test.ext.junit", 107 "androidx.test.espresso.core", 108 "androidx.test.ext.truth", 109 "ub-uiautomator", 110 "TextClassifierServiceTestingLib", 111 ], 112 113 jni_libs: [ 114 "libtextclassifier", 115 ], 116 117 test_suites: [ 118 "general-tests" 119 ], 120 121 min_sdk_version: "30", 122 sdk_version: "system_current", 123 124 test_config: "AndroidTest_TCSModelDownloaderIntegrationTest.xml", 125} 126