On Monday, January 23, 2012 8:01:26 PM UTC+1, petter wrote:
How to keep -pre-build across "android update project"?--
It seems like buld.xml has a section where one can uncomment and
customize the -pre-build and other targets:
<!-- extension targets. Uncomment the ones where you want to do custom
work
in between standard targets -->
<!--
<target name="-pre-build">
</target>
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override $
{out.dex.input.absolute.dir} */
<target name="-post-compile">
</target>
-->
If I change this to:
<!-- extension targets. Uncomment the ones where you want to do custom
work
in between standard targets -->
<target name="-pre-build">
<echo>This is pre-build</echo>
</target>
<target name="-pre-compile">
<echo>This is pre-compile</echo>
</target>
<target name="-post-compile">
<echo>This is post-compile</echo>
</target>
I'm will see these trigger during the build. However, on the next
"android project update" the code is removed and the comments are back
in the code, despite that I've changed
<!-- version-tag: 1 -->
to
<!-- version-tag: custom -->
and I even tried
<!-- version-tag: 'custom' -->
I also tried to put everything between the version-tag comment and
import target like this:
<!-- version-tag: custom -->
<target name="-pre-build">
<echo>This is pre-build</echo>
</target>
<import file="${sdk.dir}/tools/ant/build.xml" />
and also using quote:
<!-- version-tag: 'custom' -->
but it will be overwritten by the next "android project update". So
how do you add -pre-build targets to the build.xml file so that they
are not overwritten by the a project update?
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment