Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

about dialog: implement build version

  • Loading branch information...
commit a730bddb7b897bb06f33e8d22d861cbc47203f7f 1 parent 04cc797
@ge0rg authored
View
17 build.xml
@@ -70,6 +70,23 @@
build steps are used.
-->
+ <target name="-pre-build">
+ <tstamp>
+ <format property="build.date" pattern="yyyy-MM-dd" />
+ </tstamp>
+ <exec executable="git" outputproperty="git.revision">
+ <arg line="describe --tags --dirty=+"/>
+ </exec>
+ <copy file="version.xml.tpl" tofile="${resource.absolute.dir}/values/version.xml" overwrite="true">
+ <filterchain>
+ <replacetokens>
+ <token key="build_version" value="${ant.project.name} ${git.revision} ${build.date}"/>
+ </replacetokens>
+ </filterchain>
+
+ </copy>
+ </target>
+
<target name="check-proguard">
<available file="tools/proguard.jar" property="have.proguard"/>
</target>
View
9 res/layout/aboutview.xml
@@ -10,6 +10,15 @@
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:gravity="center"
+ android:textSize="20sp"
+ android:text="@string/build_version"
+ style="?attr/dialogTextColor"
+ android:layout_marginBottom="7sp"
+ />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
android:drawableLeft="@drawable/icon"
android:drawablePadding="10sp"
android:text="@string/AboutDialog_DevelopersTitle"
View
1  src/org/yaxim/androidclient/MainWindow.java
@@ -92,6 +92,7 @@
@Override
public void onCreate(Bundle savedInstanceState) {
+ Log.i(TAG, getString(R.string.build_version));
mConfig = YaximApplication.getConfig(this);
mTheme = mConfig.theme;
setTheme(mConfig.getTheme());
View
5 version.xml.tpl
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- yaxim version.xml AUTOGENERATED from version.xml.tpl -->
+<resources>
+<string name="build_version">@build_version@</string>
+</resources>
Please sign in to comment.
Something went wrong with that request. Please try again.