- changed build script. get rid of mobile-test shell scripts
- use git hash as version number for test builds
This commit is contained in:
parent
437a33f1d5
commit
48e4af33ea
@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# reverse of mobile-test-setup - reverts the changes made to AndroidManifest.xml and any resource files
|
|
||||||
|
|
||||||
mv mobile/res/values/strings.xml~ mobile/res/values/strings.xml
|
|
||||||
mv mobile/res/xml/preferences.xml~ mobile/res/xml/preferences.xml
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# quick-n-dirty script to rename the mobile build for tests
|
|
||||||
|
|
||||||
# rename the app title
|
|
||||||
test -f mobile/res/values/strings.xml~ || cp mobile/res/values/strings.xml mobile/res/values/strings.xml~
|
|
||||||
test -f mobile/res/xml/preferences.xml~ || cp mobile/res/xml/preferences.xml mobile/res/xml/preferences.xml~
|
|
||||||
sed -e 's/IITC Mobile/IITCm Test/' mobile/res/values/strings.xml~ > mobile/res/values/strings.xml
|
|
||||||
sed -e 's/targetPackage="com.cradle.iitc_mobile/targetPackage="com.cradle.iitc_mobile.test/' mobile/res/xml/preferences.xml~ > mobile/res/xml/preferences.xml
|
|
||||||
|
|
||||||
|
|
||||||
# also, you'll need to build with
|
|
||||||
# ant -Doverride.package.name=com.cradle.iitc_mobile.test ...
|
|
||||||
# or similar
|
|
@ -88,7 +88,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- allow the package name to be overridden when building -->
|
<!-- allow the package name to be overridden when building -->
|
||||||
<property name="override.package.name" value="com.cradle.iitc_mobile"/>
|
<property name="override.package.name" value="com.cradle.iitc_mobile.test"/>
|
||||||
|
|
||||||
<!-- Puts the project's resources into the output package file
|
<!-- Puts the project's resources into the output package file
|
||||||
This actually can create multiple resource package in case
|
This actually can create multiple resource package in case
|
||||||
@ -125,6 +125,80 @@
|
|||||||
</do-only-if-not-library>
|
</do-only-if-not-library>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="-pre-build" depends="-custom-git-version,-custom-manifest-version,-test-setup">
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- Packages the application. -->
|
||||||
|
<target name="-post-build">
|
||||||
|
<antcall target="-custom-restore-manifest"/>
|
||||||
|
<antcall target="-test-revert"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- Custom targets -->
|
||||||
|
<target name="-custom-git-version">
|
||||||
|
<exec executable="sh" outputproperty="git.commits">
|
||||||
|
<arg value="-c" />
|
||||||
|
<arg value="git log --pretty=format:'' | wc -l" />
|
||||||
|
</exec>
|
||||||
|
<echo>git.commits: ${git.commits}</echo>
|
||||||
|
<exec executable="git" outputproperty="git.version">
|
||||||
|
<arg value="rev-parse" />
|
||||||
|
<arg value="--short" />
|
||||||
|
<arg value="HEAD" />
|
||||||
|
</exec>
|
||||||
|
<echo>git.version: ${git.version}</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-custom-manifest-version">
|
||||||
|
<echo>Creating backup of AndroidManifest.xml</echo>
|
||||||
|
<copy file="AndroidManifest.xml" tofile="AndroidManifest.xml.antbak" preservelastmodified="true" />
|
||||||
|
|
||||||
|
<replaceregexp
|
||||||
|
file="AndroidManifest.xml"
|
||||||
|
match='android:versionCode="(\d+)"'
|
||||||
|
replace='android:versionCode="${git.commits}"' />
|
||||||
|
|
||||||
|
<replaceregexp
|
||||||
|
file="AndroidManifest.xml"
|
||||||
|
match='android:versionName="(\d+\.\d+\.\d+)"'
|
||||||
|
replace='android:versionName="\1.${git.version}"' />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-custom-restore-manifest">
|
||||||
|
<echo>Restoring backup of AndroidManifest.xml</echo>
|
||||||
|
<move file="AndroidManifest.xml.antbak"
|
||||||
|
tofile="AndroidManifest.xml"
|
||||||
|
preservelastmodified="true"
|
||||||
|
overwrite="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-test-setup">
|
||||||
|
<echo>Creating backup of strings.xml and preferences.xml</echo>
|
||||||
|
<copy file="res/values/strings.xml" tofile="strings.xml.antbak" preservelastmodified="true" />
|
||||||
|
<copy file="res/xml/preferences.xml" tofile="preferences.xml.antbak" preservelastmodified="true" />
|
||||||
|
<replaceregexp
|
||||||
|
file="res/values/strings.xml"
|
||||||
|
match='IITC Mobile'
|
||||||
|
replace='IITCm Test'/>
|
||||||
|
<replaceregexp
|
||||||
|
file="res/xml/preferences.xml"
|
||||||
|
match='targetPackage="com.cradle.iitc_mobile"'
|
||||||
|
replace='targetPackage="com.cradle.iitc_mobile.test"'/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-test-revert">
|
||||||
|
<echo>Restoring backup of strings.xml and preferences.xml</echo>
|
||||||
|
<move file="strings.xml.antbak"
|
||||||
|
tofile="res/values/strings.xml"
|
||||||
|
preservelastmodified="true"
|
||||||
|
overwrite="true" />
|
||||||
|
<move file="preferences.xml.antbak"
|
||||||
|
tofile="res/xml/preferences.xml"
|
||||||
|
preservelastmodified="true"
|
||||||
|
overwrite="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- version-tag: 1 -->
|
<!-- version-tag: 1 -->
|
||||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">IITC Mobile</string>
|
<string name="app_name">IITCm Test</string>
|
||||||
<string name="activity_settings">IITC Mobile Settings</string>
|
<string name="activity_settings">IITCm Test Settings</string>
|
||||||
<string name="activity_plugins">IITC Plugins</string>
|
<string name="activity_plugins">IITC Plugins</string>
|
||||||
<string name="activity_share">Share using…</string>
|
<string name="activity_share">Share using…</string>
|
||||||
<string name="activity_share_to_clipboard">Copy to clipboard</string>
|
<string name="activity_share_to_clipboard">Copy to clipboard</string>
|
||||||
@ -20,13 +20,13 @@
|
|||||||
<string name="iitc_version">IITC Version</string>
|
<string name="iitc_version">IITC Version</string>
|
||||||
<string name="about">About</string>
|
<string name="about">About</string>
|
||||||
|
|
||||||
<string name="pref_about_title">About IITC Mobile</string>
|
<string name="pref_about_title">About IITCm Test</string>
|
||||||
<!-- Use CDATA to prevent android from parsing html tags....we are doing this with Html.fromHtml() -->
|
<!-- Use CDATA to prevent android from parsing html tags....we are doing this with Html.fromHtml() -->
|
||||||
<string name="pref_about_msg">
|
<string name="pref_about_msg">
|
||||||
<![CDATA[<big><b>Ingress Intel Total Conversion Mobile</b></big><br><br>
|
<![CDATA[<big><b>Ingress Intel Total Conversion Mobile</b></big><br><br>
|
||||||
<b>by <a href="https://github.com/leCradle">cradle</a> and contributors</b><br><br>
|
<b>by <a href="https://github.com/leCradle">cradle</a> and contributors</b><br><br>
|
||||||
<b>Icon by <a href="http://www.ludolab.net">Giuseppe Lucido</a></b><br><br>
|
<b>Icon by <a href="http://www.ludolab.net">Giuseppe Lucido</a></b><br><br>
|
||||||
IITC Mobile is an optimized mobile browser for the
|
IITCm Test is an optimized mobile browser for the
|
||||||
Ingress Intel Total Conversion (IITC) userscript by <a href="https://github.com/breunigs"><b>breunigs</b></a>.
|
Ingress Intel Total Conversion (IITC) userscript by <a href="https://github.com/breunigs"><b>breunigs</b></a>.
|
||||||
After Niantic asked the main developer to shut down his github project, development
|
After Niantic asked the main developer to shut down his github project, development
|
||||||
is continued on a fork of <a href="https://github.com/jonatkins"><b>jonatkins</b></a>.<br><br>
|
is continued on a fork of <a href="https://github.com/jonatkins"><b>jonatkins</b></a>.<br><br>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
android:title="@string/pref_plugins"
|
android:title="@string/pref_plugins"
|
||||||
android:persistent="false">
|
android:persistent="false">
|
||||||
<intent
|
<intent
|
||||||
android:targetPackage="com.cradle.iitc_mobile"
|
android:targetPackage="com.cradle.iitc_mobile.test"
|
||||||
android:targetClass="com.cradle.iitc_mobile.IITC_PluginPreferenceActivity"/>
|
android:targetClass="com.cradle.iitc_mobile.IITC_PluginPreferenceActivity"/>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
|
Loading…
x
Reference in New Issue
Block a user