Merge "Convert Android.mk file to Android.bp"
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..6930df9
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,14 @@
+android_app {
+    name: "OpenWnn",
+    srcs: ["**/*.java"],
+    platform_apis: true,
+    jni_libs: [
+        "libWnnEngDic",
+        "libWnnJpnDic",
+        "libwnndict",
+    ],
+    aaptflags: [
+        "-c",
+        "hdpi",
+    ],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 40bb7f9..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := OpenWnn
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_JNI_SHARED_LIBRARIES := \
-	 libWnnEngDic libWnnJpnDic libwnndict
-
-LOCAL_AAPT_FLAGS += -c hdpi
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libs/Android.bp b/libs/Android.bp
new file mode 100644
index 0000000..3503a19
--- /dev/null
+++ b/libs/Android.bp
@@ -0,0 +1,21 @@
+cc_library_shared {
+    name: "libWnnEngDic",
+    srcs: ["libwnnEngDic/WnnEngDic.c"],
+    local_include_dirs: ["libwnnDictionary/include"],
+    cflags: [
+        "-O",
+        "-Wall",
+        "-Werror",
+    ],
+}
+
+cc_library_shared {
+    name: "libWnnJpnDic",
+    srcs: ["libwnnJpnDic/WnnJpnDic.c"],
+    local_include_dirs: ["libwnnDictionary/include"],
+    cflags: [
+        "-O",
+        "-Wall",
+        "-Werror",
+    ],
+}
diff --git a/libs/Android.mk b/libs/Android.mk
deleted file mode 100644
index 21ff42f..0000000
--- a/libs/Android.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libs/libwnnDictionary/Android.bp b/libs/libwnnDictionary/Android.bp
new file mode 100644
index 0000000..9e1a5e0
--- /dev/null
+++ b/libs/libwnnDictionary/Android.bp
@@ -0,0 +1,28 @@
+//----------------------------------------------------------------------
+cc_library_shared {
+    name: "libwnndict",
+    srcs: [
+        "OpenWnnDictionaryImplJni.c",
+        "engine/ndapi.c",
+        "engine/neapi.c",
+        "engine/ndbdic.c",
+        "engine/ndfdic.c",
+        "engine/ndldic.c",
+        "engine/ndrdic.c",
+        "engine/necode.c",
+        "engine/ndcommon.c",
+        "engine/nj_str.c",
+    ],
+    shared_libs: ["libdl"],
+    header_libs: ["jni_headers"],
+    local_include_dirs: [
+        "include",
+        ".",
+    ],
+    cflags: [
+        "-O",
+        "-Wno-unused-parameter",
+        "-Wall",
+        "-Werror",
+    ],
+}
diff --git a/libs/libwnnDictionary/Android.mk b/libs/libwnnDictionary/Android.mk
deleted file mode 100644
index 94ce65e..0000000
--- a/libs/libwnnDictionary/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#----------------------------------------------------------------------
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libwnndict
-
-LOCAL_SRC_FILES := \
-	OpenWnnDictionaryImplJni.c \
-	engine/ndapi.c \
-	engine/neapi.c \
-	engine/ndbdic.c \
-	engine/ndfdic.c \
-	engine/ndldic.c \
-	engine/ndrdic.c \
-	engine/necode.c \
-	engine/ndcommon.c \
-	engine/nj_str.c
-
-LOCAL_SHARED_LIBRARIES += libdl
-
-LOCAL_STATIC_LIBRARIES := 
-
-LOCAL_C_INCLUDES += \
-	$(JNI_H_INCLUDE) \
-	$(LOCAL_PATH)/include $(LOCAL_PATH)
-
-LOCAL_CFLAGS += \
-	 -O -Wno-unused-parameter -Wall -Werror
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/libwnnEngDic/Android.mk b/libs/libwnnEngDic/Android.mk
deleted file mode 100644
index 95b5dd6..0000000
--- a/libs/libwnnEngDic/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#----------------------------------------------------------------------
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libWnnEngDic
-
-LOCAL_SRC_FILES := \
-	WnnEngDic.c
-
-LOCAL_SHARED_LIBRARIES := 
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_C_INCLUDES += \
-	$(LOCAL_PATH)/../libwnnDictionary/include
-
-LOCAL_CFLAGS += \
-	-O -Wall -Werror
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/libwnnJpnDic/Android.mk b/libs/libwnnJpnDic/Android.mk
deleted file mode 100644
index 098669a..0000000
--- a/libs/libwnnJpnDic/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#----------------------------------------------------------------------
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := libWnnJpnDic
-
-LOCAL_SRC_FILES := \
-	WnnJpnDic.c
-
-LOCAL_SHARED_LIBRARIES := 
-
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_C_INCLUDES += \
-	$(LOCAL_PATH)/../libwnnDictionary/include
-
-LOCAL_CFLAGS += \
-	-O -Wall -Werror
-
-include $(BUILD_SHARED_LIBRARY)