1// Copyright (C) 2018 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_team: "trendy_team_motion",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20android_library {
21    name: "animationlib",
22    manifest: "AndroidManifest.xml",
23    sdk_version: "system_current",
24    min_sdk_version: "26",
25    static_libs: [
26        "androidx.core_core-animation",
27        "androidx.core_core-ktx",
28        "androidx.annotation_annotation",
29    ],
30    srcs: [
31        "src/**/*.java",
32        "src/**/*.kt",
33    ],
34    resource_dirs: [
35        "res",
36    ],
37    kotlincflags: ["-Xjvm-default=all"],
38}
39
40android_library {
41    name: "animationlib-tests-base",
42    libs: [
43        "android.test.base",
44        "androidx.test.core",
45    ],
46    static_libs: [
47        "animationlib",
48        "androidx.test.ext.junit",
49        "androidx.test.rules",
50        "testables",
51    ],
52}
53
54android_app {
55    name: "TestAnimationLibApp",
56    platform_apis: true,
57    static_libs: [
58        "animationlib-tests-base",
59    ],
60}
61
62android_robolectric_test {
63    enabled: true,
64    name: "animationlib_robo_tests",
65    srcs: [
66        "tests/src/**/*.kt",
67        "tests/robolectric/src/**/*.kt",
68    ],
69    java_resource_dirs: ["tests/robolectric/config"],
70    instrumentation_for: "TestAnimationLibApp",
71    upstream: true,
72    strict_mode: false,
73}
74
75android_test {
76    name: "animationlib_tests",
77    manifest: "tests/AndroidManifest.xml",
78
79    static_libs: [
80        "animationlib-tests-base",
81    ],
82    srcs: [
83        "tests/src/**/*.java",
84        "tests/src/**/*.kt",
85    ],
86    kotlincflags: ["-Xjvm-default=all"],
87    test_suites: ["general-tests"],
88}
89