blob: f7ff63b37282ffa031edd837451797ac73f11324 [file] [log] [blame]
Tony Mak608b1ae2019-08-13 20:02:00 +01001//
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"],
Tony Mak86f494d2019-11-18 16:34:08 +000044 manifest: "LibNoManifest_AndroidManifest.xml",
Tony Mak608b1ae2019-08-13 20:02:00 +010045 static_libs: [
46 "androidx.core_core",
47 "libtextclassifier-java",
48 "androidx.annotation_annotation",
49 "guava",
Tony Mak8cd7ba62019-10-15 15:29:22 +010050 "textclassifier-statsd",
51 "error_prone_annotations",
Tony Mak608b1ae2019-08-13 20:02:00 +010052 ],
53 sdk_version: "system_current",
54 min_sdk_version: "28",
Tony Mak608b1ae2019-08-13 20:02:00 +010055}
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"],
Tony Makc96c0782020-08-24 22:45:06 +010068 cmd: "$(location stats-log-api-gen) --java $(out) --module textclassifier --javaPackage com.android.textclassifier.common.statsd --javaClass TextClassifierStatsLog",
69 out: ["com/android/textclassifier/common/statsd/TextClassifierStatsLog.java"],
Tony Mak608b1ae2019-08-13 20:02:00 +010070}