Add a rule for building the javadoc
authorDa Risk <darisk972@gmail.com>
Thu, 02 Apr 2009 19:00:23 +0200
changeset 54 dfbb0fbece57
parent 51 85705bdb77ab
child 55 66732dd2cb77
Add a rule for building the javadoc
.hgignore
build.xml
--- a/.hgignore	Thu Apr 02 14:32:07 2009 +0200
+++ b/.hgignore	Thu Apr 02 19:00:23 2009 +0200
@@ -1,2 +1,5 @@
+syntax: glob
 bin/*
 R.java
+doc/javadoc
+src/com/beem/project/beem/service/aidl/*.java
--- a/build.xml	Thu Apr 02 14:32:07 2009 +0200
+++ b/build.xml	Thu Apr 02 19:00:23 2009 +0200
@@ -114,6 +114,8 @@
 
     <property name="android-jar" value="${sdk-folder}/android.jar" />
 
+    <property name="javadoc-output" value="doc/javadoc" />
+	
     <!-- Rules -->
 
     <!-- Create the output directories if they don't exist yet. -->
@@ -121,6 +123,7 @@
         <echo>Creating output directories if needed...</echo>
         <mkdir dir="${outdir}" />
         <mkdir dir="${outdir-classes}" />
+    	<mkdir dir="${javadoc-output}" />
     </target>
 
     <!-- Generate the R.java file for this project's resources. -->
@@ -145,11 +148,13 @@
         <echo>Compiling aidl files into Java classes...</echo>
         <apply executable="${aidl}" failonerror="true">
             <arg value="-p${android-framework}" />
+            <arg value="-p${basedir}/project.aidl"/>
             <arg value="-I${srcdir}" />
             <fileset dir="${srcdir}">
                 <include name="**/*.aidl"/>
             </fileset>
         </apply>
+    	
     </target>
 
     <!-- Compile this project's .java files into .class files. -->
@@ -244,7 +249,9 @@
 
     <!-- Package the application without signing it.
          This allows for the application to be signed later with an official publishing key. -->
-    <target name="release" depends="dex, package-res">
+    <target name="release" depends="dex, package-res"
+    	description="Package the application without signing it.
+        This allows for the application to be signed later with an official publishing key.">
         <echo>Packaging ${out-unsigned-package} for release...</echo>
         <exec executable="${apk-builder}" failonerror="true">
             <arg value="${out-unsigned-package-ospath}" />
@@ -264,7 +271,8 @@
     </target>
 
     <!-- Install the package on the default emulator -->
-    <target name="install" depends="debug">
+    <target name="install" depends="debug"
+    	description="Install the package on the default emulator">
         <echo>Installing ${out-debug-package} onto default emulator...</echo>
         <exec executable="${adb}" failonerror="true">
             <arg value="install" />
@@ -281,8 +289,9 @@
         </exec>
     </target>
 
-    <!-- Uinstall the package from the default emulator -->
-    <target name="uninstall">
+    <!-- Uninstall the package from the default emulator -->
+    <target name="uninstall"
+    	description="Uninstall the package from the default emulator">
         <echo>Uninstalling ${application-package} from the default emulator...</echo>
         <exec executable="${adb}" failonerror="true">
             <arg value="uninstall" />
@@ -295,6 +304,13 @@
 	<delete verbose="false" dir="${outdir}"/>
     </target>
 
-
+    <target name="javadoc" depends="aidl"
+    	description="Build the javadoc">
+	<javadoc sourcepath="${srcdir}" destdir="${javadoc-output}">
+	    <classpath>
+		<fileset dir="${external-libs}" includes="*.jar" />
+	    </classpath>
+	</javadoc>	
+    </target>
 
 </project>