Convert tzlookup_generator to Android.bp

See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Ib6f8b8175e7e27e1ec636bd8abc299d1fe9743cc
diff --git a/tzlookup_generator/Android.bp b/tzlookup_generator/Android.bp
new file mode 100644
index 0000000..a05979f
--- /dev/null
+++ b/tzlookup_generator/Android.bp
@@ -0,0 +1,40 @@
+// Copyright (C) 2017 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.
+
+// Proto library
+java_library_host {
+    name: "countryzonesprotos",
+    proto: {
+        type: "full",
+        include_dirs: ["external/protobuf/src"],
+    },
+
+    srcs: ["src/main/proto/**/*.proto"],
+}
+
+// The tzlookup_generator host tool.
+java_binary_host {
+    name: "tzlookup_generator",
+
+    manifest: "src/main/manifest/MANIFEST.mf",
+    srcs: ["src/main/java/**/*.java"],
+    javacflags: [
+        "-encoding UTF-8",
+    ],
+    static_libs: [
+        "icu4j",
+        "countryzonesprotos",
+        "libprotobuf-java-full",
+    ],
+}
diff --git a/tzlookup_generator/Android.mk b/tzlookup_generator/Android.mk
deleted file mode 100644
index e70efb2..0000000
--- a/tzlookup_generator/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-# Proto library
-include $(CLEAR_VARS)
-LOCAL_MODULE := countryzonesprotos
-LOCAL_PROTOC_OPTIMIZE_TYPE := full
-LOCAL_PROTOC_FLAGS := -Iexternal/protobuf/src
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-LOCAL_SRC_FILES := $(call all-proto-files-under, src/main/proto)
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-# A static library for the tzlookup_generator host tool.
-# The tool can be run with java -jar tzlookup_generator.jar
-include $(CLEAR_VARS)
-LOCAL_MODULE := tzlookup_generator
-LOCAL_MODULE_TAGS := optional
-LOCAL_JAR_MANIFEST := src/main/manifest/MANIFEST.mf
-LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java)
-LOCAL_JAVACFLAGS := -encoding UTF-8
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    icu4j-host \
-    countryzonesprotos \
-    libprotobuf-java-full
-include $(BUILD_HOST_JAVA_LIBRARY)