41 lines
1.7 KiB
XML
41 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project name="BluetoothLeLibrary" default="default">
|
|
<loadproperties srcFile="local.properties" />
|
|
<property file="ant.properties" />
|
|
<loadproperties srcFile="project.properties" />
|
|
|
|
<!-- quick check on sdk.dir -->
|
|
<fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" unless="sdk.dir" />
|
|
|
|
<!-- version-tag: 1 -->
|
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
|
|
|
<!-- Read the Android Manifest -->
|
|
<path id="android.antlibs">
|
|
<pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" />
|
|
</path>
|
|
|
|
<taskdef name="xpath" classname="com.android.ant.XPathTask" classpathref="android.antlibs" />
|
|
<xpath input="./AndroidManifest.xml" expression="/manifest/@android:versionName" output="manifest.versionName" />
|
|
|
|
<!-- Setup the build properties -->
|
|
<property name="versionedName" value="${ant.project.name}-${manifest.versionName}" />
|
|
<property name="distLocation" location="dist" />
|
|
<echo message="Running task(s) for ${versionedName}" />
|
|
|
|
<target name="default">
|
|
<antcall target="jar"/>
|
|
<antcall target="doc"/>
|
|
</target>
|
|
|
|
<target name="jar" depends="debug" description="build the library as a jar">
|
|
<jar destfile="${distLocation}/${versionedName}.jar" basedir="bin/classes" />
|
|
</target>
|
|
<target name="doc" description="generate documentation">
|
|
<property name="temp" location="temp" />
|
|
<javadoc sourcepath="${source.dir}" destdir="${temp}" />
|
|
<jar destfile="${distLocation}/${versionedName}-javadoc.jar" basedir="temp" keepcompression="true" />
|
|
<delete dir="${temp}" />
|
|
</target>
|
|
</project>
|