diff --git a/java/src/com/android/inputmethod/annotations/ExternallyReferenced.java b/common/src/com/android/inputmethod/annotations/ExternallyReferenced.java
similarity index 100%
rename from java/src/com/android/inputmethod/annotations/ExternallyReferenced.java
rename to common/src/com/android/inputmethod/annotations/ExternallyReferenced.java
diff --git a/java/src/com/android/inputmethod/annotations/UsedForTesting.java b/common/src/com/android/inputmethod/annotations/UsedForTesting.java
similarity index 100%
rename from java/src/com/android/inputmethod/annotations/UsedForTesting.java
rename to common/src/com/android/inputmethod/annotations/UsedForTesting.java
diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/common/src/com/android/inputmethod/latin/Constants.java
similarity index 100%
rename from java/src/com/android/inputmethod/latin/Constants.java
rename to common/src/com/android/inputmethod/latin/Constants.java
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk
index ff6c1e433b567fb5490029641788634229efcacf..09af9a02027e9d18f72bef8eba09656f6b4a8fd0 100644
--- a/tools/dicttool/Android.mk
+++ b/tools/dicttool/Android.mk
@@ -35,7 +35,6 @@ LATINIME_LOCAL_DIR := ../..
 LATINIME_BASE_SRC_DIR := $(LATINIME_LOCAL_DIR)/java/src/com/android/inputmethod
 LATINIME_BASE_OVERRIDABLE_SRC_DIR := \
         $(LATINIME_LOCAL_DIR)/java-overridable/src/com/android/inputmethod
-LATINIME_ANNOTATIONS_SRC_DIR := $(LATINIME_BASE_SRC_DIR)/annotations
 MAKEDICT_CORE_SRC_DIR := $(LATINIME_BASE_SRC_DIR)/latin/makedict
 LATINIME_TESTS_SRC_DIR := $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin
 
@@ -82,15 +81,12 @@ DICTTOOL_COMPAT_TESTS_DIR := compat
 
 LOCAL_MAIN_SRC_FILES := $(call all-java-files-under, $(MAKEDICT_CORE_SRC_DIR))
 LOCAL_TOOL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_ANNOTATIONS_SRC_FILES := $(call all-java-files-under, $(LATINIME_ANNOTATIONS_SRC_DIR))
 
 LOCAL_SRC_FILES := $(LOCAL_TOOL_SRC_FILES) \
         $(filter-out $(addprefix %/, $(notdir $(LOCAL_TOOL_SRC_FILES))), $(LOCAL_MAIN_SRC_FILES)) \
-        $(call all-java-files-under, $(DICTTOOL_COMPAT_TESTS_DIR)) \
-        $(LOCAL_ANNOTATIONS_SRC_FILES) $(USED_TARGETED_SRC_FILES) \
-        $(LATINIME_BASE_SRC_DIR)/latin/Constants.java \
-        $(call all-java-files-under, tests) \
-        $(call all-java-files-under, $(DICTTOOL_ONDEVICE_TESTS_DIR))
+        $(USED_TARGETED_SRC_FILES) \
+        $(call all-java-files-under, \
+                tests $(DICTTOOL_COMPAT_TESTS_DIR) $(DICTTOOL_ONDEVICE_TESTS_DIR))
 
 LOCAL_JAVA_LIBRARIES := junit
 LOCAL_STATIC_JAVA_LIBRARIES := jsr305lib latinime-common-host