Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
updated to build assets with version number
Browse files Browse the repository at this point in the history
couchbase.jar will now include version number
installer updated to remove old jars
  no longer overwritten by unzipping new files
installer updated to remove old references in .classpath

Change-Id: I1cd0100f530bad6bc21f1e17f73ae0d4080c2a5b
Reviewed-on: http://review.couchbase.org/11256
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Marty Schoch <marty.schoch@gmail.com>
  • Loading branch information
mschoch committed Nov 29, 2011
1 parent 53c57cb commit aa56a92
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.markdown
Expand Up @@ -145,12 +145,13 @@ The current build of Android Couchbase embed the CouchDB binaries. There is info
In some environments it may not be possible to use the couchbase.xml ant script installer. Couchbase can be installed manually using the following steps.

1. Unzip the Couchbase.zip archive. This will produce another zip file named overlay.zip.
2. Extract the contents of the overlay.zip file into your project. This will place all assets and libraries in the correct location within the structure of your project.
2. Remove any existing couchbase*.jar file from <project root>/libs
3. Extract the contents of the overlay.zip file into your project. This will place all assets and libraries in the correct location within the structure of your project.

cd <project root>
unzip /<path to>/overlay.zip

3. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
4. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.

Within the "application" section add:

Expand Down
11 changes: 10 additions & 1 deletion build.xml
Expand Up @@ -87,7 +87,7 @@
<path id="android.libraries.jars"><path refid="project.libraries.jars" /></path>

<target name="couchbase-jar" depends="-compile">
<jar destfile="bin/couchbase.jar">
<jar destfile="bin/couchbase-${version}.jar">
<fileset dir="bin/classes">
<include name="**/*"/>
<exclude name="**/R*"/>
Expand All @@ -98,6 +98,15 @@
</jar>
</target>

<target name="couchbase-script">
<copy todir="bin/script">
<fileset dir="script"/>
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
</copy>
</target>

<target name="jni">
<exec dir="${basedir}/jni" executable="sh">
<arg line="${ndk.dir}/ndk-build"/>
Expand Down
5 changes: 3 additions & 2 deletions doc/README.txt
Expand Up @@ -95,12 +95,13 @@ For examples please look at:
In some environments it may not be possible to use the couchbase.xml ant script installer. Couchbase can be installed manually using the following steps.

1. Unzip the Couchbase.zip archive. This will produce another zip file named overlay.zip.
2. Extract the contents of the overlay.zip file into your project. This will place all assets and libraries in the correct location within the structure of your project.
2. Remove any existing couchbase*.jar file from <project root>/libs
3. Extract the contents of the overlay.zip file into your project. This will place all assets and libraries in the correct location within the structure of your project.

cd <project root>
unzip /<path to>/overlay.zip

3. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
4. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.

Within the "application" section add:

Expand Down
10 changes: 7 additions & 3 deletions script/classpath.couchbase.xsl
Expand Up @@ -2,17 +2,21 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- remove existing references to couchbase jar -->
<xsl:template match="classpathentry[contains(@path, 'libs/couchbase')]"></xsl:template>

<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<!-- insert reference to the latest version of couchbase jar -->
<xsl:template match="classpath">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<classpathentry kind="lib" path="libs/couchbase.jar"/>
<xsl:apply-templates select="classpathentry|text()"/>
<classpathentry kind="lib" path="libs/couchbase-@VERSION@.jar"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>
4 changes: 4 additions & 0 deletions script/couchbase-internal.xml
Expand Up @@ -14,6 +14,10 @@
</target>

<target name="update-libaries">
<!-- delete old couchbase jar -->
<delete quiet="true">
<fileset dir="${project.path}/libs" includes="couchbase*.jar"/>
</delete>
<unzip dest="${project.path}" src="${couchbase.tmp.dir}/overlay.zip"/>
</target>

Expand Down

0 comments on commit aa56a92

Please sign in to comment.