blob: fb894fa6fd076c4c4a07179e26e1fc78ddbf01bc [file] [log] [blame]
Yein Jod4d9e6a2023-09-15 23:31:22 +00001// Copyright (C) 2023 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19android_library {
20 name: "WeatherEffectsLib",
21 manifest: "AndroidManifest.xml",
22 sdk_version: "system_current",
23 // min_sdk version must be specified to not compile against platform apis.
Yein Jo63d62f22023-10-26 00:32:10 +000024 // Using HardwareBufferRenderer requires minimum of 34.
25 min_sdk_version: "34",
Yein Jod4d9e6a2023-09-15 23:31:22 +000026 static_libs: [
27 "androidx.slice_slice-core",
28 "androidx.slice_slice-builders",
29 "dagger2",
30 "jsr330", // Dagger inject annotations.
31 "kotlinx_coroutines_android",
32 "kotlinx_coroutines",
33 "androidx.core_core-ktx",
34 "androidx.appcompat_appcompat",
35 "androidx-constraintlayout_constraintlayout",
36 "toruslib",
37 ],
38 srcs: [
39 "src/**/*.java",
40 "src/**/*.kt",
41 // TODO(b/300991599): Split out debug source.
42 "debug/src/**/*.java",
43 "debug/src/**/*.kt"
44 ],
45 resource_dirs: [
46 "res",
47 // TODO(b/300991599): Split out debug resources.
48 "debug/res"
49 ],
50 javacflags: ["-Adagger.fastInit=enabled"],
51 kotlincflags: ["-Xjvm-default=all"],
52 plugins: ["dagger2-compiler"],
53 dxflags: ["--multi-dex"],
54 // This library is meant to access only public APIs, do not flip this flag to true.
55 platform_apis: false
56}
57
58android_app {
59 name: "WeatherEffects",
60 owner: "google",
61 privileged: false,
62 sdk_version: "system_current",
Yein Jo63d62f22023-10-26 00:32:10 +000063 min_sdk_version: "34",
Yein Jod4d9e6a2023-09-15 23:31:22 +000064 static_libs: [
65 "WeatherEffectsLib"
66 ],
67 use_embedded_native_libs: true,
68 optimize: {
69 enabled: true,
70 shrink: true,
71 shrink_resources: true,
72 },
73}
74
Yein Jo0bc0f4b2023-10-03 17:23:38 +000075android_test {
76 name: "weathereffects_tests",
77 instrumentation_for: "WeatherEffects",
78 manifest: "AndroidManifest.xml",
79 test_suites: ["general-tests"],
80 sdk_version: "current",
81 srcs: [
82 "tests/src/**/*.java",
83 "tests/src/**/*.kt",
84 ],
85 static_libs: [
86 "WeatherEffectsLib",
87 "androidx.test.rules",
88 "androidx.test.ext.junit",
89 "androidx.test.core",
90 "androidx.test.runner",
91 "kotlinx_coroutines_test",
92 "truth"
93 ],
94}
Yein Jod4d9e6a2023-09-15 23:31:22 +000095