Fix up the Android.mk and scripts for the current version

Change-Id: I92afaca00f94d4547c81498b04f7eab60ba026a2
diff --git a/baksmali/Android.mk b/baksmali/Android.mk
index 42f880e..ca3c9f6 100644
--- a/baksmali/Android.mk
+++ b/baksmali/Android.mk
@@ -19,7 +19,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := baksmali
+LOCAL_MODULE := baksmalilib
 
 LOCAL_MODULE_TAGS := optional
 
@@ -38,10 +38,11 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
 	antlr-runtime \
-	commons-cli-1.2
+	commons-cli-1.2 \
+	guavalib
 
-#extract the current version from the pom file
-BAKSMALI_VERSION := $(shell xsltproc $(LOCAL_PATH)/../extract-property.xslt $(LOCAL_PATH)/../pom.xml)
+#read in the version number
+BAKSMALI_VERSION := $(shell cat $(LOCAL_PATH)/../version)
 
 #create a new baksmali.properties file using the correct version
 $(intermediates)/resources/baksmali.properties:
@@ -65,7 +66,7 @@
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
-$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/baksmali.jar
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/baksmalilib.jar
 $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/../scripts/baksmali | $(ACP)
 	@echo "Copy: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-new-target)
diff --git a/scripts/baksmali b/scripts/baksmali
index f2bfe75..2e8addc 100755
--- a/scripts/baksmali
+++ b/scripts/baksmali
@@ -35,7 +35,7 @@
 cd "${oldwd}"
 
 
-jarfile=baksmali.jar
+jarfile=baksmalilib.jar
 libdir="$progdir"
 
 if [ ! -r "$libdir/$jarfile" ]; then
diff --git a/scripts/smali b/scripts/smali
index 71f8e2b..a55d112 100755
--- a/scripts/smali
+++ b/scripts/smali
@@ -35,7 +35,7 @@
 cd "${oldwd}"
 
 
-jarfile=smali.jar
+jarfile=smalilib.jar
 libdir="$progdir"
 
 if [ ! -r "$libdir/$jarfile" ]; then
diff --git a/smali/Android.mk b/smali/Android.mk
index dac88a4..aa4ce2f 100644
--- a/smali/Android.mk
+++ b/smali/Android.mk
@@ -19,7 +19,7 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := smali
+LOCAL_MODULE := smalilib
 
 LOCAL_MODULE_TAGS := optional
 
@@ -30,20 +30,18 @@
 intermediates := $(call local-intermediates-dir,COMMON)
 
 GEN := $(addprefix $(intermediates)/, \
-			smaliLexer.java \
 			smaliParser.java \
 			smaliTreeWalker.java \
         )
 
 ANTLR_JAR = $(call java-lib-deps,antlr,true)
 
-$(intermediates)/smaliTreeWalker.java: $(intermediates)/smaliParser.java $(intermediates)/smaliLexer.java
-$(intermediates)/smaliParser.java: $(intermediates)/smaliLexer.java
+$(intermediates)/smaliTreeWalker.java: $(intermediates)/smaliParser.java
 
 $(GEN): $(ANTLR_JAR)
 $(GEN): PRIVATE_PATH := $(LOCAL_PATH)
 $(GEN): PRIVATE_CUSTOM_TOOL = java -jar $(ANTLR_JAR) -fo $(dir $@) $<
-$(GEN): $(intermediates)/%.java :  $(LOCAL_PATH)/src/main/antlr3/org/jf/smali/%.g
+$(GEN): $(intermediates)/%.java :  $(LOCAL_PATH)/src/main/antlr3/%.g
 	$(transform-generated-source)
 
 LOCAL_GENERATED_SOURCES += $(GEN)
@@ -57,10 +55,12 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
 	antlr-runtime \
-	commons-cli-1.2
+	commons-cli-1.2 \
+	guavalib \
+	jsr305lib
 
-#extract the current version from the pom file
-SMALI_VERSION := $(shell xsltproc $(LOCAL_PATH)/../extract-property.xslt $(LOCAL_PATH)/../pom.xml)
+#read in the version number
+SMALI_VERSION := $(shell cat $(LOCAL_PATH)/../version)
 
 #create a new smali.properties file using the correct version
 $(intermediates)/resources/smali.properties:
@@ -84,7 +84,7 @@
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
-$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/smali.jar
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/smalilib.jar
 $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/../scripts/smali | $(ACP)
 	@echo "Copy: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-new-target)