Non-module targets in art.

Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: Ic8523dcb6af4dc03bc45b6d1e2bba8400a57eaf7
diff --git a/Android.mk b/Android.mk
index 93c1fef..9257c22 100644
--- a/Android.mk
+++ b/Android.mk
@@ -884,6 +884,8 @@
 $$(public_sdk_$(1)_stub): PRIVATE_MIN_SDK_VERSION := $(1)
 $$(public_sdk_$(1)_stub): $$(call resolve-prebuilt-sdk-jar-path,$(1)) $$(DX) $$(ZIP2ZIP)
 	$$(transform-classes.jar-to-dex)
+
+$$(call declare-1p-target,$$(public_sdk_$(1)_stub),art)
 endef
 
 $(foreach version,$(SDK_VERSIONS),$(eval $(call create_public_sdk_dex,$(version))))
@@ -899,6 +901,9 @@
 $$(PUBLIC_SDK_$(1)_STUB_ZIP_PATH): $$(SOONG_ZIP) $$(public_sdk_$(1)_stub)
 	rm -f $$@
 	$$(SOONG_ZIP) -o $$@ -C $$(PRIVATE_SDK_STUBS_DEX_DIR) -D $$(PRIVATE_SDK_STUBS_DEX_DIR)
+
+$$(call declare-1p-container,$$(PUBLIC_SDK_$(1)_STUB_ZIP_PATH),art)
+$$(call declare-container-license-deps,$$(PUBLIC_SDK_$(1)_STUB_ZIP_PATH),$$(public_sdk_$(1)_stub),$$(PUBLIC_SDK_$(1)_STUB_PATH):)
 endef
 
 $(foreach version,$(SDK_VERSIONS),$(eval $(call create_public_sdk_zip,$(version))))
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index e28fb73..def3190 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -194,6 +194,7 @@
   gtest_build_rule := test-art-host-gtest-dependencies-$$(gtest_suffix)
   gtest_output := $(call intermediates-dir-for,PACKAGING,art-host-gtest,HOST)/$$(gtest_suffix).xml
   $$(call dist-for-goals,$$(gtest_rule),$$(gtest_output):gtest/$$(gtest_suffix))
+  $$(call declare-1p-target,$$(gtest_output))
   gtest_exe := $(2)
   # Dependencies for all host gtests.
   gtest_deps := $$(ART_HOST_DEX_DEPENDENCIES) \
diff --git a/tools/veridex/Android.mk b/tools/veridex/Android.mk
index a298af4..614952f 100644
--- a/tools/veridex/Android.mk
+++ b/tools/veridex/Android.mk
@@ -26,12 +26,15 @@
 $(system_stub_dex): $(call resolve-prebuilt-sdk-jar-path,system_current) | $(ZIP2ZIP) $(DX)
 	$(transform-classes.jar-to-dex)
 
+$(call declare-1p-target,$(system_stub_dex),art)
 
 oahl_stub_dex := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/oahl_dex_intermediates/classes.dex
 $(oahl_stub_dex): PRIVATE_MIN_SDK_VERSION := 1000
 $(oahl_stub_dex): $(call get-prebuilt-sdk-dir,current)/org.apache.http.legacy.jar | $(ZIP2ZIP) $(DX)
 	$(transform-classes.jar-to-dex)
 
+$(call declare-1p-target,$(oahl_stub_dex),art)
+
 # Phony rule to create all dependencies of the appcompat.sh script.
 .PHONY: appcompat
 appcompat: $(system_stub_dex) $(oahl_stub_dex) $(HOST_OUT_EXECUTABLES)/veridex \
@@ -65,6 +68,10 @@
 	rm -f $(PRIVATE_SYSTEM_STUBS_ZIP)
 	rm -f $(PRIVATE_OAHL_STUBS_ZIP)
 
+$(call declare-1p-container,$(VERIDEX_FILES_PATH),art)
+$(call declare-container-license-deps,$(VERIDEX_FILES_PATH),$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS) \
+    $(HOST_OUT_EXECUTABLES)/veridex $(system_stub_dex) $(oahl_stub_dex),$(VERIDEX_FILES_PATH):)
+
 # Make the zip file available for prebuilts.
 $(call dist-for-goals,sdk,$(VERIDEX_FILES_PATH))