Merge "Convert selinux_policy to Android.bp" into main
diff --git a/Android.bp b/Android.bp
index 7d36b86..f214253 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1162,3 +1162,22 @@
default: [],
}),
}
+
+phony {
+ name: "selinux_policy",
+ required: [
+ // Runs checkfc against merged service_contexts files
+ "merged_hwservice_contexts_test",
+ "merged_service_contexts_test",
+ "selinux_policy_nonsystem",
+ "selinux_policy_system",
+ ],
+}
+
+// selinux_policy is a main goal and triggers lots of tests.
+// Most tests are FAKE modules, so aren'triggered on normal builds. (e.g. 'm')
+// By setting as droidcore's dependency, tests will run on normal builds.
+phony_rule {
+ name: "droidcore",
+ phony_deps: ["selinux_policy"],
+}
diff --git a/Android.mk b/Android.mk
index 9dfc531..254d1c2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -176,31 +176,6 @@
endif
endif
-#################################
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := selinux_policy
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
-LOCAL_LICENSE_CONDITIONS := notice unencumbered
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
-LOCAL_MODULE_TAGS := optional
-LOCAL_REQUIRED_MODULES += \
- selinux_policy_nonsystem \
- selinux_policy_system \
-
-# Runs checkfc against merged service_contexts files
-LOCAL_REQUIRED_MODULES += \
- merged_service_contexts_test \
- merged_hwservice_contexts_test
-
-include $(BUILD_PHONY_PACKAGE)
-
-# selinux_policy is a main goal and triggers lots of tests.
-# Most tests are FAKE modules, so aren'triggered on normal builds. (e.g. 'm')
-# By setting as droidcore's dependency, tests will run on normal builds.
-droidcore: selinux_policy
-
##################################
# Policy files are now built with Android.bp. Grab them from intermediate.
# See Android.bp for details of policy files.