| // |
| // Copyright (C) 2021 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"], |
| } |
| |
| java_library { |
| name: "modules-utils-native-coverage-listener", |
| srcs: ["NativeCoverageHackInstrumentationListener.java"], |
| static_libs: [ |
| "androidx.test.rules", |
| ], |
| sdk_version: "test_current", |
| min_sdk_version: "29", |
| visibility: ["//visibility:public"], |
| } |
| |
| // TODO(b/281577492): split in 2 (one for just ExtendedMockito stuff) |
| // NOTE: clients should depend on modules-utils-testable-device-config-defaults |
| // instead of using this library directly (so it sets the proper JNI dependencies) |
| java_library { |
| name: "modules-utils-testable-device-config", |
| srcs: [ |
| "StaticMockFixture.java", |
| "StaticMockFixtureRule.java", |
| "ExtendedMockitoRule.java", |
| "TestableDeviceConfig.java", |
| ], |
| static_libs: [ |
| "androidx.test.rules", |
| "mockito-target-extended-minus-junit4", |
| "modules-utils-build", |
| "modules-utils-preconditions", |
| ], |
| libs: [ |
| "framework-configinfrastructure", |
| "framework-annotations-lib", |
| ], |
| sdk_version: "module_current", |
| min_sdk_version: "29", |
| visibility: ["//visibility:public"], |
| } |
| |
| // TODO(b/281577492): split in 2 (one for just ExtendedMockito stuff) |
| // Utility for mocking DeviceConfig and other device state. |
| // In order to use these utils successfully, both Java code and native libraries will be required. |
| // If your code is in a library, you will have to depend on these defaults both in the library as |
| // well as in the android_test that it gets linked into. |
| // You will also need to specify android:debuggable="true" in the test's manifest. |
| java_defaults { |
| name: "modules-utils-testable-device-config-defaults", |
| static_libs: ["modules-utils-testable-device-config"], |
| compile_multilib: "both", |
| jni_libs: [ |
| "libdexmakerjvmtiagent", |
| "libstaticjvmtiagent", |
| ], |
| defaults_visibility: ["//visibility:public"], |
| } |