include build date and git version into about dialog

storage_ts_index
Georg Lukas 2011-03-08 02:27:18 +01:00
rodzic 5c7c0f190c
commit 04cbc5c5e0
4 zmienionych plików z 29 dodań i 0 usunięć

Wyświetl plik

@ -58,6 +58,20 @@
</filterchain>
</copy>
<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="-pre-compile">

Wyświetl plik

@ -6,6 +6,14 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="20dp"
android:layout_marginBottom="5dp"
android:text="@string/build_version"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"

Wyświetl plik

@ -43,6 +43,8 @@ class APRSdroid extends Activity with OnClickListener
super.onCreate(savedInstanceState)
setContentView(R.layout.main)
Log.d(TAG, "starting " + getString(R.string.build_version))
singleBtn.setOnClickListener(this);
startstopBtn.setOnClickListener(this);

5
version.xml.tpl 100644
Wyświetl plik

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- APRSdroid version.xml AUTOGENERATED from version.xml.tpl -->
<resources>
<string name="build_version">@build_version@</string>
</resources>