Kawa build.xml patch for Android

Marius Kjeldahl marius@kjeldahl.net
Tue Jul 3 12:55:00 GMT 2012


First of all; great job on Android support for Kawa.

With the latest Android SDK release, the patch provided for building 
applications does not seem to work. With some minor modifications to the 
targets I managed to get it working. I've attached the updated patch 
below my email.

Secondly, in an email list posting, Peter Feigl mentions being able to 
reduce the Kawa apk payload down to 150KB. In my recent build of Kawa, 
the apk payload is still around 1.2MB.

If getting it down to 150KB is as simple as Peter describes, any special 
reason why it has not been done yet as part of the "official" Kawa 
Android support?

Current "lips" payloads for Android development seems to be 1.2MB for 
Kawa and 1.7MB for Clojure, but if it could be reduced to a simple 150KB 
it would certainly give Kawa a big head start...

Thanks,

Marius K.

--- build.xml.orig	2012-07-03 13:51:06.147210935 +0200
+++ build.xml	2012-07-03 14:45:35.107208287 +0200
@@ -89,4 +89,27 @@
      <!-- version-tag: 1 -->
      <import file="${sdk.dir}/tools/ant/build.xml" />

+    <target name="-dex" depends="-compile,scompile">
+      <dex-helper />
+    </target>
+
+    <!-- Compile this project's .scm files into .class files. -->
+    <target name="scompile" depends="-code-gen">
+      <java failonerror="true" fork="true" classname="kawa.repl">
+	<classpath>
+	  <pathelement path="libs/kawa.jar"/>
+	  <pathelement path="${sdk.dir}/platforms/${target}/android.jar"/>
+          <pathelement path="${out.classes.absolute.dir}"/>
+	</classpath>
+       <arg value="-d"/> <arg path="${out.classes.absolute.dir}"/>
+       <arg line="-P kawa.android. --warn-undefined-variable 
--module-static-run --warn-invoke-unknown-method --warn-as-error"/>
+       <arg value="-C"/>
+       <arg file="src/kawa/android/hello.scm"/>
+<!--       <fileset dir=".">
+         <include name="**/*.scm"/>
+       </fileset>
+-->
+      </java>
+    </target>
+
  </project>



More information about the Kawa mailing list