blob: de96b2b2dd41e936c6c5699b89d9c23bf921d4c4 [file] [edit]
// Copyright (C) 2026 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
default_visibility: ["//visibility:public"],
default_team: "trendy_team_launcher",
}
// =============================================================================
// ANNOTATION PROCESSOR (HOST)
// =============================================================================
java_plugin {
name: "systemui-safeparcel-processor",
strict_deps: "error",
processor_class: "com.android.systemui.ondeviceintelligence.safeparcel.SafeParcelProcessor",
static_libs: ["systemui-safeparcel-processor-lib"],
generates_api: true,
visibility: [
"//frameworks/libs/systemui/ondeviceintelligencelib:__subpackages__",
"//vendor:__subpackages__",
"//packages/apps/Launcher3:__subpackages__",
],
}
java_plugin {
name: "systemui-safeparcel-ksp-processor",
strict_deps: "error",
static_libs: ["systemui-safeparcel-processor-lib"],
generates_api: true,
visibility: ["//visibility:public"],
}
java_library_host {
name: "systemui-safeparcel-processor-lib",
strict_deps: "error",
use_tools_jar: true,
srcs: [
"safeparcel-processor/src/**/*.java",
"safeparcel-processor/src/**/*.kt",
],
java_resource_dirs: ["safeparcel-processor/resources/"],
static_libs: [
"androidx.annotation_annotation",
"guava",
"javapoet",
"jsilver",
"kotlin_symbol_processing_api",
],
}
java_library {
name: "ondeviceintelligence-core",
strict_deps: "error",
srcs: [
"core/src/**/*.kt",
"core/src/**/*.java",
],
static_libs: [
"androidx.annotation_annotation",
"androidx.core_core",
"androidx.core_core-ktx",
"kotlin-stdlib",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"guava",
],
plugins: [
"systemui-safeparcel-processor",
],
enable_ksp: true,
kotlincflags: ["-Xjvm-default=all"],
visibility: ["//visibility:public"],
}
java_library {
name: "ondeviceintelligence-prompt",
strict_deps: "error",
srcs: [
"prompt/src/**/*.kt",
],
static_libs: [
"ondeviceintelligence-core",
"androidx.annotation_annotation",
"androidx.core_core",
"androidx.core_core-ktx",
"kotlin-stdlib",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"guava",
],
plugins: [
"systemui-safeparcel-ksp-processor",
],
enable_ksp: true,
kotlincflags: ["-Xjvm-default=all"],
visibility: ["//visibility:public"],
}
android_app {
name: "TestOnDeviceIntelligenceLibApp",
strict_deps: "error",
platform_apis: true,
static_libs: [
"ondeviceintelligence-prompt",
],
}
android_robolectric_test {
name: "OnDeviceIntelligenceLibTests",
strict_deps: "error",
srcs: ["tests/src/**/*.kt"],
static_libs: [
"ondeviceintelligence-core",
"ondeviceintelligence-prompt",
],
libs: [
"android.test.runner.impl",
"android.test.base.impl",
"androidx.test.core",
"androidx.test.ext.junit-nodeps",
"androidx.test.runner",
"android.test.mock.impl",
"truth",
"kotlinx_coroutines",
"kotlinx_coroutines_test",
"kotlin-test",
"junit",
],
kotlincflags: ["-Xjvm-default=all"],
instrumentation_for: "TestOnDeviceIntelligenceLibApp",
upstream: true,
}