Fix default build(test.version=0)

This commit is contained in:
Alibek Omarov (a1batross) 2017-09-28 16:48:41 +03:00
parent 691fbe8615
commit 51b53e0f2c
2 changed files with 36 additions and 28 deletions

View file

@ -77,12 +77,20 @@ declared in default.properties.
<!-- Replaces the target in tools\ant\build.xml --> <!-- Replaces the target in tools\ant\build.xml -->
<import file="${sdk.dir}/tools/ant/build.xml" /> <import file="${sdk.dir}/tools/ant/build.xml" />
<target name="-package-resources" depends="-crunch"> <if>
<if> <condition>
<condition> <isset property="test.version"/>
<isset property="test.version"/> </condition>
</condition> <then>
<then> <property file="test.properties" />
</then>
<else>
<property name="test.dir" value="" />
<property name="test.pkg.postfix" value="" />
</else>
</if>
<target name="-package-resources" depends="-crunch">
<!-- this exec replicates the output of the aapt task in build.xml <!-- this exec replicates the output of the aapt task in build.xml
-package-resources with the addition of a rename-manifest-package option. --> -package-resources with the addition of a rename-manifest-package option. -->
<exec executable="${aapt}" failonerror="true"> <exec executable="${aapt}" failonerror="true">
@ -90,9 +98,9 @@ declared in default.properties.
<arg value="-f" /> <arg value="-f" />
<arg value="--auto-add-overlay" /> <arg value="--auto-add-overlay" />
<arg value="-M" /> <arg value="-M" />
<arg path="${basedir}/test/AndroidManifest.xml" /> <arg path="${basedir}/${test.dir}AndroidManifest.xml" />
<arg value="-S" /> <arg value="-S" />
<arg path="${basedir}/test/res" /> <arg path="${basedir}/${test.dir}res" />
<arg value="-A" /> <arg value="-A" />
<arg path="${basedir}/assets" /> <arg path="${basedir}/assets" />
<arg value="-I" /> <arg value="-I" />
@ -100,11 +108,9 @@ declared in default.properties.
<arg value="-F" /> <arg value="-F" />
<arg path="${out.absolute.dir}/${resource.package.file.name}" /> <arg path="${out.absolute.dir}/${resource.package.file.name}" />
<arg value="--rename-manifest-package" /> <arg value="--rename-manifest-package" />
<arg value="in.celest.xash3d.hl.test" /> <arg value="in.celest.xash3d.hl${test.pkg.postfix}" />
</exec> </exec>
</then> </target>
</if>
</target>
<!-- Import the actual build file. <!-- Import the actual build file.
To customize existing targets, there are two options: To customize existing targets, there are two options:

2
test.properties Normal file
View file

@ -0,0 +1,2 @@
test.dir=test/
test.pkg.postfix=.test