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 17// A standalone TextClassifierService app for testing. 18android_app { 19 name: "TextClassifierService", 20 static_libs: ["TextClassifierServiceLib"], 21 jni_libs: ["libtextclassifier"], 22 sdk_version: "system_current", 23 min_sdk_version: "28", 24 certificate: "platform", 25 optimize: { 26 proguard_flags_files: ["proguard.flags"], 27 }, 28 use_embedded_native_libs: true, 29} 30 31// A library that contains all java classes with the AndroidManifest. 32android_library { 33 name: "TextClassifierServiceLib", 34 static_libs: ["TextClassifierServiceLibNoManifest"], 35 sdk_version: "system_current", 36 min_sdk_version: "28", 37 manifest: "AndroidManifest.xml", 38} 39 40// Similar to TextClassifierServiceLib, but without the AndroidManifest. 41android_library { 42 name: "TextClassifierServiceLibNoManifest", 43 srcs: ["src/**/*.java"], 44 manifest: "LibNoManifest_AndroidManifest.xml", 45 static_libs: [ 46 "androidx.core_core", 47 "libtextclassifier-java", 48 "androidx.annotation_annotation", 49 "guava", 50 "textclassifier-statsd", 51 "error_prone_annotations", 52 ], 53 sdk_version: "system_current", 54 min_sdk_version: "28", 55} 56 57java_library { 58 name: "textclassifier-statsd", 59 sdk_version: "system_current", 60 srcs: [ 61 ":statslog-textclassifier-java-gen", 62 ], 63} 64 65genrule { 66 name: "statslog-textclassifier-java-gen", 67 tools: ["stats-log-api-gen"], 68 cmd: "$(location stats-log-api-gen) --java $(out) --module textclassifier --javaPackage com.android.textclassifier --javaClass TextClassifierStatsLog", 69 out: ["com/android/textclassifier/TextClassifierStatsLog.java"], 70} 71