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,34 +77,40 @@ 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" />
<!-- this exec replicates the output of the aapt task in build.xml </then>
-package-resources with the addition of a rename-manifest-package option. --> <else>
<exec executable="${aapt}" failonerror="true"> <property name="test.dir" value="" />
<arg value="package" /> <property name="test.pkg.postfix" value="" />
<arg value="-f" /> </else>
<arg value="--auto-add-overlay" /> </if>
<arg value="-M" />
<arg path="${basedir}/test/AndroidManifest.xml" /> <target name="-package-resources" depends="-crunch">
<arg value="-S" /> <!-- this exec replicates the output of the aapt task in build.xml
<arg path="${basedir}/test/res" /> -package-resources with the addition of a rename-manifest-package option. -->
<arg value="-A" /> <exec executable="${aapt}" failonerror="true">
<arg path="${basedir}/assets" /> <arg value="package" />
<arg value="-I" /> <arg value="-f" />
<arg path="${project.target.android.jar}" /> <arg value="--auto-add-overlay" />
<arg value="-F" /> <arg value="-M" />
<arg path="${out.absolute.dir}/${resource.package.file.name}" /> <arg path="${basedir}/${test.dir}AndroidManifest.xml" />
<arg value="--rename-manifest-package" /> <arg value="-S" />
<arg value="in.celest.xash3d.hl.test" /> <arg path="${basedir}/${test.dir}res" />
</exec> <arg value="-A" />
</then> <arg path="${basedir}/assets" />
</if> <arg value="-I" />
</target> <arg path="${project.target.android.jar}" />
<arg value="-F" />
<arg path="${out.absolute.dir}/${resource.package.file.name}" />
<arg value="--rename-manifest-package" />
<arg value="in.celest.xash3d.hl${test.pkg.postfix}" />
</exec>
</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