Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upgraded project to work with latest android SDK

ran "android update project --path ."
and merged our customizations

Change-Id: I2a174f2406d70f765d28e4161dba778d971c5dfe
Reviewed-on: http://review.couchbase.org/10668
Tested-by: Marty Schoch <marty.schoch@gmail.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
  • Loading branch information...
commit aca0354a55e3cb9218c1e6bf2ab55069f0f50016 1 parent b3e5afd
@mschoch mschoch authored
Showing with 63 additions and 57 deletions.
  1. +59 −53 build.xml
  2. +4 −4 default.properties → project.properties
View
112 build.xml
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="." default="help">
+<project name="Android-Couchbase" default="help">
-<!-- The local.properties file is created and updated by the 'android'
- tool.
- It contains the path to the SDK. It should *NOT* be checked into
- Version Control Systems. -->
- <property file="local.properties" />
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
- <!-- The build.properties file can be created by you and is never touched
- by the 'android' tool. This is the place to change some of the
- default property values used by the Ant rules.
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
@@ -17,6 +16,9 @@
out.dir
The name of the output directory. Default is 'bin'.
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
@@ -24,17 +26,24 @@
application and should be checked into Version Control Systems.
-->
- <property file="build.properties" />
+ <property file="ant.properties" />
- <!-- The default.properties file is created and updated by the 'android'
+ <!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
- <property file="default.properties" />
+ <loadproperties srcFile="project.properties" />
-
- <!-- Required pre-setup import -->
- <import file="${sdk.dir}/tools/ant/pre_setup.xml" />
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
<!-- extension targets. Uncomment the ones where you want to do custom work
@@ -45,52 +54,49 @@
<target name="-pre-compile">
</target>
- [This is typically used for code obfuscation.
- Compiled code location: ${out.classes.absolute.dir}
- If this is not done in place, override ${out.dex.input.absolute.dir}]
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
<target name="-post-compile">
</target>
-->
- <!-- Execute the Android Setup task that will setup some properties
- specific to the target, and import the build rules files.
-
- The rules file is imported from
- <SDK>/tools/ant/
- Depending on the project type it can be either:
- - main_rules.xml
- - lib_rules.xml
- - test_rules.xml
+ <!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
- <setup> task.
+ <import> task.
- customize it to your needs.
- - Customize the whole script.
+ - Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
- into this file, *after* the <setup> task
- - disable the import of the rules by changing the setup task
- below to <setup import="false" />.
+ into this file, replacing the <import> task.
- customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
-->
- <setup />
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
<!-- added by marty, per this discussion http://code.google.com/p/android/issues/detail?id=13024 -->
<path id="android.libraries.src"><path refid="project.libraries.src" /></path>
<path id="android.libraries.jars"><path refid="project.libraries.jars" /></path>
- <target name="couchbase-jar" depends="compile">
- <jar destfile="bin/couchbase.jar">
- <fileset dir="bin/classes">
- <include name="**/*"/>
- <exclude name="**/R*"/>
- </fileset>
- <fileset dir="src">
- <include name="**/*"/>
- </fileset>
- </jar>
- </target>
+ <target name="couchbase-jar" depends="-compile">
+ <jar destfile="bin/couchbase.jar">
+ <fileset dir="bin/classes">
+ <include name="**/*"/>
+ <exclude name="**/R*"/>
+ </fileset>
+ <fileset dir="src">
+ <include name="**/*"/>
+ </fileset>
+ </jar>
+ </target>
<target name="jni">
<exec dir="${basedir}/jni" executable="sh">
@@ -98,16 +104,16 @@
</exec>
</target>
- <target name="javadoc">
- <javadoc
- destdir="bin/docs"
- windowtitle="Android Couchbase">
+ <target name="javadoc">
+ <javadoc
+ destdir="bin/docs"
+ windowtitle="Android Couchbase">
- <packageset dir="src" defaultexcludes="yes">
- <include name="com/couchbase/android/**"/>
- </packageset>
+ <packageset dir="src" defaultexcludes="yes">
+ <include name="com/couchbase/android/**"/>
+ </packageset>
- </javadoc>
- </target>
+ </javadoc>
+ </target>
</project>
View
8 default.properties → project.properties
@@ -1,12 +1,12 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
+#
# This file must be checked in Version Control Systems.
-#
+#
# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
+# "ant.properties", and override values to adapt the script to your
# project structure.
+android.library=true
# Project target.
target=android-7
-android.library=true
Please sign in to comment.
Something went wrong with that request. Please try again.