| package { |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| java_library_static { |
| name: "TestApp_JavaProtos", |
| host_supported: true, |
| proto: { |
| type: "lite", |
| }, |
| srcs: ["src/library/main/proto/testapp_protos.proto"], |
| } |
| |
| android_library { |
| name: "TestApp_TestApps", |
| sdk_version: "test_current", |
| srcs: [ |
| "src/testapps/main/java/**/*.java", |
| ], |
| static_libs: [ |
| "EventLib", |
| "TestApp_Annotations", |
| "ConnectedAppsSDK", |
| "ConnectedAppsSDK_Annotations", |
| "androidx.annotation_annotation", |
| "RemoteFrameworkClasses", |
| ], |
| manifest: "src/testapps/main/AndroidManifest.xml", |
| min_sdk_version: "29", |
| plugins: [ |
| "ConnectedAppsSDK_Processor", |
| "TestApp_Processor", |
| ], |
| } |
| |
| android_library { |
| name: "TestApp", |
| sdk_version: "test_current", |
| srcs: [ |
| "src/library/main/java/**/*.java", |
| ], |
| static_libs: [ |
| "Nene", |
| "EventLib", |
| "Queryable", |
| "TestApp_Annotations", |
| "ConnectedAppsSDK", |
| "ConnectedAppsSDK_Annotations", |
| "androidx.annotation_annotation", |
| "TestApp_TestApps", |
| "TestApp_JavaProtos", |
| "QueryableCommonAndroid", |
| "auto_value_annotations", |
| ], |
| manifest: "src/library/main/AndroidManifest.xml", |
| min_sdk_version: "29", |
| resource_zips: [":TestApp_Apps"], |
| plugins: [ |
| "ConnectedAppsSDK_Processor", |
| "TestApp_Processor", |
| "auto_annotation_plugin", |
| ], |
| } |
| |
| android_test { |
| name: "TestAppTest", |
| srcs: [ |
| "src/test/java/**/*.java", |
| ], |
| test_suites: [ |
| "general-tests", |
| ], |
| static_libs: [ |
| "Nene", |
| "TestApp", |
| "TestApp_TestApps", |
| "Harrier", |
| "EventLib", |
| "androidx.test.ext.junit", |
| "truth", |
| "testng", // for assertThrows |
| ], |
| manifest: "src/test/AndroidManifest.xml", |
| min_sdk_version: "29", |
| plugins: ["auto_annotation_plugin"], |
| } |
| |
| python_binary_host { |
| name: "index_testapps", |
| version: { |
| py3: { |
| embedded_launcher: true, |
| }, |
| }, |
| main: "tools/index/index_testapps.py", |
| srcs: [ |
| "tools/index/index_testapps.py", |
| "src/library/main/proto/testapp_protos.proto", |
| ], |
| proto: { |
| canonical_path_from_root: false, |
| }, |
| } |
| |
| java_genrule { |
| name: "TestApp_Apps", |
| srcs: [ |
| ":EmptyTestApp", |
| ":NotEmptyTestApp", |
| ":DeviceAdminTestApp", |
| ":TestOnlyDeviceAdminTestApp", |
| ":LockTaskApp", |
| ":DelegateTestApp", |
| ":ContentTestApp", |
| ":DevicePolicyManagementRoleHolderTestApp", |
| ":RemoteDPCTestApp", |
| ":RemoteDPCTestAppTargetingV23", |
| ":RemoteDPCTestAppTargetingV24", |
| ":RemoteDPCTestAppTargetingV28", |
| ":RemoteDPCTestAppTargetingV30", |
| ":DialerApp", |
| ":SmsApp", |
| ":AccountManagementApp", |
| ":RemoteAccountAuthenticatorApp", |
| ":MLCTestApp", |
| ":MultipleActivitiesTestApp", |
| ], |
| out: ["TestApp_Apps.res.zip"], |
| tools: [ |
| "soong_zip", |
| "index_testapps", |
| "aapt2", |
| ], |
| cmd: "mkdir -p $(genDir)/res/raw" + |
| " && cp $(location :EmptyTestApp) $(genDir)/res/raw" + |
| " && cp $(location :NotEmptyTestApp) $(genDir)/res/raw" + |
| " && cp $(location :DeviceAdminTestApp) $(genDir)/res/raw" + |
| " && cp $(location :TestOnlyDeviceAdminTestApp) $(genDir)/res/raw" + |
| " && cp $(location :LockTaskApp) $(genDir)/res/raw" + |
| " && cp $(location :DelegateTestApp) $(genDir)/res/raw" + |
| " && cp $(location :ContentTestApp) $(genDir)/res/raw" + |
| " && cp $(location :DevicePolicyManagementRoleHolderTestApp) $(genDir)/res/raw" + |
| " && cp $(location :RemoteDPCTestApp) $(genDir)/res/raw" + |
| " && cp $(location :RemoteDPCTestAppTargetingV23) $(genDir)/res/raw" + |
| " && cp $(location :RemoteDPCTestAppTargetingV24) $(genDir)/res/raw" + |
| " && cp $(location :RemoteDPCTestAppTargetingV28) $(genDir)/res/raw" + |
| " && cp $(location :RemoteDPCTestAppTargetingV30) $(genDir)/res/raw" + |
| " && cp $(location :DialerApp) $(genDir)/res/raw" + |
| " && cp $(location :SmsApp) $(genDir)/res/raw" + |
| " && cp $(location :AccountManagementApp) $(genDir)/res/raw" + |
| " && cp $(location :RemoteAccountAuthenticatorApp) $(genDir)/res/raw" + |
| " && cp $(location :MLCTestApp) $(genDir)/res/raw" + |
| " && cp $(location :MultipleActivitiesTestApp) $(genDir)/res/raw" + |
| " && $(location index_testapps) --directory $(genDir)/res/raw --aapt2 $(location aapt2)" + |
| " && $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res/raw", |
| } |
| |
| android_test_helper_app { |
| name: "EmptyTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/EmptyTestAppManifest.xml", |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "NotEmptyTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/NotEmptyTestAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "DeviceAdminTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/DeviceAdminManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "TestOnlyDeviceAdminTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/TestOnlyDeviceAdminManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "LockTaskApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/LockTaskAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "DelegateTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/DelegateManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "ContentTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/ContentAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "DevicePolicyManagementRoleHolderTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/DevicePolicyManagementRoleHolderManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteDPCTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/RemoteDPCManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteDPCTestAppTargetingV23", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/RemoteDPCManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| aaptflags: [ |
| "--rename-manifest-package com.android.cts.RemoteDPCV23", |
| ], |
| target_sdk_version: "23", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteDPCTestAppTargetingV24", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/RemoteDPCManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| aaptflags: [ |
| "--rename-manifest-package com.android.cts.RemoteDPCV24", |
| ], |
| target_sdk_version: "24", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteDPCTestAppTargetingV28", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/RemoteDPCManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| aaptflags: [ |
| "--rename-manifest-package com.android.cts.RemoteDPCV28", |
| ], |
| target_sdk_version: "28", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteDPCTestAppTargetingV30", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| resource_dirs: ["src/testapps/main/res/device_admin"], |
| manifest: "manifests/RemoteDPCManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| aaptflags: [ |
| "--rename-manifest-package com.android.cts.RemoteDPCV30", |
| ], |
| target_sdk_version: "30", |
| } |
| |
| android_test_helper_app { |
| name: "DialerApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/DialerAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "SmsApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/SmsAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "AccountManagementApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| resource_dirs: ["src/testapps/main/res/accountmanagement"], |
| manifest: "manifests/AccountManagementManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "MLCTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/MLCTestAppManifest.xml", |
| resource_dirs: ["src/testapps/main/res/mlctestapp"], |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "RemoteAccountAuthenticatorApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| resource_dirs: ["src/testapps/main/res/accountmanagement"], |
| manifest: "manifests/RemoteAccountAuthenticatorManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| sdk_version: "test_current", |
| } |
| |
| android_test_helper_app { |
| name: "MultipleActivitiesTestApp", |
| static_libs: [ |
| "TestApp_TestApps", |
| ], |
| defaults: ["mts-target-sdk-version-current"], |
| manifest: "manifests/MultipleActivitiesTestAppManifest.xml", |
| additional_manifests: ["CommonManifest.xml"], |
| min_sdk_version: "29", |
| } |
| |
| java_library { |
| name: "TestApp_Annotations", |
| srcs: [ |
| "src/processor/main/java/com/android/bedstead/testapp/processor/annotations/*.java", |
| ], |
| host_supported: true, |
| } |
| |
| java_plugin { |
| name: "TestApp_Processor", |
| processor_class: "com.android.bedstead.testapp.processor.Processor", |
| static_libs: [ |
| "javapoet", |
| "auto_service_annotations", |
| "TestApp_Annotations", |
| "ConnectedAppsSDK_Annotations", |
| ], |
| srcs: [ |
| "src/processor/main/java/com/android/bedstead/testapp/processor/Processor.java", |
| ], |
| plugins: ["auto_service_plugin"], |
| generates_api: true, |
| } |