diff options
| author | Kenny Root <kenny@the-b.org> | 2009-01-19 13:42:29 +0000 |
|---|---|---|
| committer | Kenny Root <kenny@the-b.org> | 2009-01-19 13:42:29 +0000 |
| commit | 839269b7015c51464f7cae3566ca714cc4649182 (patch) | |
| tree | 9e404694190d0a8b6da3be45222eedc366987850 | |
| parent | 29c5b0ebce7829c450c19d6416398657f25b2e88 (diff) | |
| download | connectbot-839269b7015c51464f7cae3566ca714cc4649182.tar.gz connectbot-839269b7015c51464f7cae3566ca714cc4649182.tar.bz2 connectbot-839269b7015c51464f7cae3566ca714cc4649182.zip | |
Get rid of ant-contrib.jar
| -rw-r--r-- | build.xml | 53 | ||||
| -rw-r--r-- | lib/ant/ant-contrib.jar | bin | 119512 -> 0 bytes |
2 files changed, 28 insertions, 25 deletions
@@ -270,31 +270,34 @@ </target> <target name="update-version" description="Updates the Version.java file with current SVN revision"> - <echo>Updating strings.xml with SVN revision and build date...</echo> - <property name="revision" value="HEAD"/> - <tstamp> - <format property="build.date" pattern="yyyy.MM.dd" /> - </tstamp> - - <!-- find out svn.revision of HEAD, need svn.exe installed on local machine --> - <exec executable="svn" outputproperty="svnlog.out"> - <arg line="info -r ${revision}"/> - </exec> - - <loadfile property="android.manifest" srcFile="${basedir}/AndroidManifest.xml" encoding="${encoding}" /> - <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${lib.dir}/ant/ant-contrib.jar"/> - <propertyregex property="version.number" input="${android.manifest}" select="\1" - regexp='android:versionName="([0-9\.]+)"' - defaultValue="0" /> - - <propertyregex property="svn.revision" input="${svnlog.out}" select="\1" - regexp="Revision: ([0-9]+)" - defaultValue="0" /> - - <replaceregexp file="${resource-dir}/values/strings.xml" encoding="${encoding}" match='(\x3Cstring name="msg_version">)[^\x3C]*(\x3C/string>)' - replace='\1${ant.project.name} ${version.number} (r${svn.revision} ${build.date})\2' /> - - <echo>Updated "msg_version" to: ${ant.project.name} ${version.number} (r${svn.revision} ${build.date})</echo> + <echo>Updating strings.xml with SVN revision and build date...</echo> + <property name="revision" value="HEAD"/> + <tstamp> + <format property="build.date" pattern="yyyy.MM.dd" /> + </tstamp> + + <!-- Get the version name from the android manifest, will en up in property ${manifest.android:versionName} --> + <xmlproperty file="${basedir}/AndroidManifest.xml" collapseAttributes="true"/> + + <!-- find out svn.revision of HEAD, need svn.exe installed on local machine will en up in property ${Revision} --> + <exec executable="svn" output="svnlog.out"> + <arg line="info -r ${revision}"/> + </exec> + + <loadproperties srcFile="svnlog.out"> + <filterchain> + <linecontains> + <contains value="Revision"/> + </linecontains> + </filterchain> + </loadproperties> + + <delete file="svnlog.out"/> + + <replaceregexp file="${resource-dir}/values/strings.xml" encoding="${encoding}" match='(\x3Cstring name="msg_version">)[^\x3C]*(\x3C/string>)' + replace='\1${ant.project.name} ${manifest.android:versionName} (r${Revision} ${build.date})\2' /> + + <echo>Updated "msg_version" to: ${ant.project.name} ${manifest.android:versionName} (r${Revision} ${build.date})</echo> </target> </project> diff --git a/lib/ant/ant-contrib.jar b/lib/ant/ant-contrib.jar Binary files differdeleted file mode 100644 index db90b0a..0000000 --- a/lib/ant/ant-contrib.jar +++ /dev/null |
