Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 1 | // |
| 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 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame^] | 18 | default_team: "trendy_team_fwk_core_networking", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 19 | // See: http://go/android-license-faq |
Baligh Uddin | 2afd098 | 2021-05-24 03:50:01 +0000 | [diff] [blame] | 20 | default_applicable_licenses: ["Android-Apache-2.0"], |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | android_test { |
| 24 | name: "FrameworksNetIntegrationTests", |
Remi NGUYEN VAN | 02eee9a | 2023-01-30 19:19:48 +0900 | [diff] [blame] | 25 | defaults: [ |
| 26 | "framework-connectivity-internal-test-defaults", |
| 27 | "NetworkStackApiShimSettingsForCurrentBranch", |
| 28 | ], |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 29 | platform_apis: true, |
| 30 | certificate: "platform", |
| 31 | srcs: [ |
| 32 | "src/**/*.kt", |
| 33 | "src/**/*.aidl", |
| 34 | ], |
| 35 | libs: [ |
| 36 | "android.test.mock", |
Remi NGUYEN VAN | 0a37e72 | 2021-08-04 19:19:49 +0900 | [diff] [blame] | 37 | "ServiceConnectivityResources", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 38 | ], |
| 39 | static_libs: [ |
Remi NGUYEN VAN | 02eee9a | 2023-01-30 19:19:48 +0900 | [diff] [blame] | 40 | // It does not matter if NetworkStackApiStableLib or NetworkStackApiCurrentLib is used here, |
| 41 | // since the shims for the branch are already included via |
| 42 | // NetworkStackApiShimSettingsForCurrentBranch, and will be used in priority as they are |
| 43 | // first in the classpath. |
| 44 | // If the wrong shims are used for some reason, tests that use newer APIs fail. |
| 45 | // TODO: have NetworkStackApiStableLib link dynamically against the shims to remove this |
| 46 | // order-dependent setup. |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 47 | "NetworkStackApiStableLib", |
| 48 | "androidx.test.ext.junit", |
Junyu Lai | 54e84ab | 2023-10-23 13:36:26 +0800 | [diff] [blame] | 49 | "compatibility-device-util-axt", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 50 | "frameworks-net-integration-testutils", |
| 51 | "kotlin-reflect", |
| 52 | "mockito-target-extended-minus-junit4", |
| 53 | "net-tests-utils", |
Remi NGUYEN VAN | b240e2a | 2021-07-12 23:40:56 +0000 | [diff] [blame] | 54 | "service-connectivity-pre-jarjar", |
Lorenzo Colitti | 3d52172 | 2022-02-04 01:39:01 +0900 | [diff] [blame] | 55 | "service-connectivity-tiramisu-pre-jarjar", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 56 | "services.net", |
| 57 | "testables", |
| 58 | ], |
| 59 | test_suites: ["device-tests"], |
| 60 | use_embedded_native_libs: true, |
| 61 | jni_libs: [ |
| 62 | // For mockito extended |
| 63 | "libdexmakerjvmtiagent", |
| 64 | "libstaticjvmtiagent", |
| 65 | // android_library does not include JNI libs: include NetworkStack dependencies here |
| 66 | "libnativehelper_compat_libc++", |
| 67 | "libnetworkstackutilsjni", |
Remi NGUYEN VAN | 6a20eed | 2022-01-31 11:21:08 +0900 | [diff] [blame] | 68 | "libandroid_net_connectivity_com_android_net_module_util_jni", |
Patrick Rohr | d817436 | 2022-02-01 12:32:43 +0100 | [diff] [blame] | 69 | "libservice-connectivity", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 70 | ], |
Remi NGUYEN VAN | b240e2a | 2021-07-12 23:40:56 +0000 | [diff] [blame] | 71 | jarjar_rules: ":connectivity-jarjar-rules", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | // Utilities for testing framework code both in integration and unit tests. |
| 75 | java_library { |
| 76 | name: "frameworks-net-integration-testutils", |
| 77 | defaults: ["framework-connectivity-test-defaults"], |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame^] | 78 | srcs: [ |
| 79 | "util/**/*.java", |
| 80 | "util/**/*.kt", |
| 81 | ], |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 82 | static_libs: [ |
| 83 | "androidx.annotation_annotation", |
| 84 | "androidx.test.rules", |
| 85 | "junit", |
| 86 | "net-tests-utils", |
| 87 | ], |
| 88 | libs: [ |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 89 | "service-connectivity-pre-jarjar", |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 90 | "services.core", |
| 91 | "services.net", |
| 92 | ], |
Remi NGUYEN VAN | e55a88d | 2022-04-20 15:59:16 +0900 | [diff] [blame] | 93 | visibility: [ |
| 94 | "//packages/modules/Connectivity/tests/integration", |
| 95 | "//packages/modules/Connectivity/tests/unit", |
| 96 | ], |
Remi NGUYEN VAN | 678277c | 2021-05-11 13:37:06 +0000 | [diff] [blame] | 97 | } |