Skip to content

Commit aa56a92

Browse files
committed
updated to build assets with version number
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 <[email protected]> Tested-by: Marty Schoch <[email protected]>
1 parent 53c57cb commit aa56a92

File tree

5 files changed

+27
-8
lines changed

5 files changed

+27
-8
lines changed

README.markdown

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,13 @@ The current build of Android Couchbase embed the CouchDB binaries. There is info
145145
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.
146146

147147
1. Unzip the Couchbase.zip archive. This will produce another zip file named overlay.zip.
148-
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.
148+
2. Remove any existing couchbase*.jar file from <project root>/libs
149+
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.
149150

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

153-
3. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
154+
4. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
154155

155156
Within the "application" section add:
156157

build.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<path id="android.libraries.jars"><path refid="project.libraries.jars" /></path>
8888

8989
<target name="couchbase-jar" depends="-compile">
90-
<jar destfile="bin/couchbase.jar">
90+
<jar destfile="bin/couchbase-${version}.jar">
9191
<fileset dir="bin/classes">
9292
<include name="**/*"/>
9393
<exclude name="**/R*"/>
@@ -98,6 +98,15 @@
9898
</jar>
9999
</target>
100100

101+
<target name="couchbase-script">
102+
<copy todir="bin/script">
103+
<fileset dir="script"/>
104+
<filterset>
105+
<filter token="VERSION" value="${version}"/>
106+
</filterset>
107+
</copy>
108+
</target>
109+
101110
<target name="jni">
102111
<exec dir="${basedir}/jni" executable="sh">
103112
<arg line="${ndk.dir}/ndk-build"/>

doc/README.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ For examples please look at:
9595
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.
9696

9797
1. Unzip the Couchbase.zip archive. This will produce another zip file named overlay.zip.
98-
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.
98+
2. Remove any existing couchbase*.jar file from <project root>/libs
99+
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.
99100

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

103-
3. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
104+
4. Update the project's AndroidManifest.xml to declare the Couchbase service and request the required permissions.
104105

105106
Within the "application" section add:
106107

script/classpath.couchbase.xsl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
<xsl:stylesheet version="1.0"
33
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
44

5+
<!-- remove existing references to couchbase jar -->
6+
<xsl:template match="classpathentry[contains(@path, 'libs/couchbase')]"></xsl:template>
7+
58
<xsl:template match="@*|node()">
69
<xsl:copy>
710
<xsl:apply-templates select="@*|node()"/>
811
</xsl:copy>
912
</xsl:template>
1013

14+
<!-- insert reference to the latest version of couchbase jar -->
1115
<xsl:template match="classpath">
1216
<xsl:copy>
13-
<xsl:apply-templates select="@*|node()"/>
14-
<classpathentry kind="lib" path="libs/couchbase.jar"/>
17+
<xsl:apply-templates select="classpathentry|text()"/>
18+
<classpathentry kind="lib" path="libs/couchbase-@VERSION@.jar"/>
1519
</xsl:copy>
1620
</xsl:template>
1721

18-
</xsl:stylesheet>
22+
</xsl:stylesheet>

script/couchbase-internal.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
</target>
1515

1616
<target name="update-libaries">
17+
<!-- delete old couchbase jar -->
18+
<delete quiet="true">
19+
<fileset dir="${project.path}/libs" includes="couchbase*.jar"/>
20+
</delete>
1721
<unzip dest="${project.path}" src="${couchbase.tmp.dir}/overlay.zip"/>
1822
</target>
1923

0 commit comments

Comments
 (0)