Merge "Convert dx droiddoc module to Soong." am: 25124d0f46
am: 1df84d1eb0

Change-Id: I9f808cbefd70e37e70eb6eef20696e2500bbde7c
diff --git a/dx/Android.mk b/dx/Android.mk
index c8887a2..bf6acc2 100644
--- a/dx/Android.mk
+++ b/dx/Android.mk
@@ -131,7 +131,6 @@
 # ============================================================
 subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
 		junit-tests \
-		src \
 	))
 
 include $(subdirs)
diff --git a/dx/src/Android.bp b/dx/src/Android.bp
new file mode 100644
index 0000000..f3409eb
--- /dev/null
+++ b/dx/src/Android.bp
@@ -0,0 +1,31 @@
+// Copyright (C) 2006 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+droiddoc_host {
+    name: "dx-docs",
+    srcs: [
+        "com/**/*.java",
+    ],
+    args: "-hidden",
+    custom_template: "droiddoc-templates-sdk",
+    create_stubs: false,
+    product_variables: {
+        pdk: {
+            enabled: false,
+        },
+        unbundled_build: {
+            enabled: false,
+        },
+    },
+}
diff --git a/dx/src/Android.mk b/dx/src/Android.mk
deleted file mode 100644
index 9bded44..0000000
--- a/dx/src/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-#
-LOCAL_PATH := $(call my-dir)
-
-# This tool is prebuilt if we're doing an app-only build.
-ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),)
-
-dx_src_files := $(call all-subdir-java-files)
-
-# the documentation
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(dx_src_files) $(call all-subdir-html-files)
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= dx
-LOCAL_DROIDDOC_OPTIONS := -hidden
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_IS_HOST_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-dx_src_files :=
-
-endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK