package { default_applicable_licenses: ["Android-Apache-2.0"], } android_library { name: "TestApp_TestApps", sdk_version: "test_current", srcs: [ "src/main/testapps/java/**/*.java" ], static_libs: [ "Nene", "EventLib", "TestApp_Annotations", "ConnectedAppsSDK", "ConnectedAppsSDK_Annotations", "androidx.annotation_annotation", ], manifest: "src/main/testapps/AndroidManifest.xml", min_sdk_version: "28", plugins: ["ConnectedAppsSDK_Processor", "TestApp_Processor"], } android_library { name: "TestApp", sdk_version: "test_current", srcs: [ "src/main/library/java/**/*.java" ], static_libs: [ "Nene", "EventLib", "Queryable", "TestApp_Annotations", "ConnectedAppsSDK", "ConnectedAppsSDK_Annotations", "androidx.annotation_annotation", "TestApp_TestApps" ], manifest: "src/main/library/AndroidManifest.xml", min_sdk_version: "28", resource_zips: [":TestApp_Apps"], plugins: ["ConnectedAppsSDK_Processor", "TestApp_Processor"], } 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-prebuilt", "testng" // for assertThrows ], manifest: "src/test/AndroidManifest.xml", min_sdk_version: "28" } python_binary_host { name: "index_testapps", version: { py2: { enabled: false, embedded_launcher: false, }, py3: { enabled: true, embedded_launcher: true, }, }, main: "tools/index/index_testapps.py", srcs: [ "tools/index/index_testapps.py", ] } java_genrule { name: "TestApp_Apps", srcs: [":EmptyTestApp", ":EmptyTestApp2", ":DeviceAdminTestApp", ":LockTaskApp"], out: ["TestApp_Apps.res.zip"], tools: ["soong_zip", "index_testapps"], cmd: "mkdir -p $(genDir)/res/raw" + " && cp $(location :EmptyTestApp) $(genDir)/res/raw" + " && cp $(location :EmptyTestApp2) $(genDir)/res/raw" + " && cp $(location :DeviceAdminTestApp) $(genDir)/res/raw" + " && cp $(location :LockTaskApp) $(genDir)/res/raw" + " && $(location index_testapps) --directory $(genDir)/res/raw" + " && $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res/raw" } android_test_helper_app { name: "EmptyTestApp", static_libs: [ "TestApp_TestApps" ], manifest: "manifests/EmptyTestAppManifest.xml", min_sdk_version: "28" } android_test_helper_app { name: "EmptyTestApp2", static_libs: [ "TestApp_TestApps" ], manifest: "manifests/EmptyTestApp2Manifest.xml", min_sdk_version: "28" } android_test_helper_app { name: "DeviceAdminTestApp", static_libs: [ "TestApp_TestApps", "DeviceAdminApp" ], manifest: "manifests/DeviceAdminManifest.xml", min_sdk_version: "28" } android_test_helper_app { name: "LockTaskApp", static_libs: [ "TestApp_TestApps", "DeviceAdminApp" ], manifest: "manifests/LockTaskAppManifest.xml", min_sdk_version: "28" } 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, }