Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>With thanks to Matt Wolfe for his help, I'm posting a partial answer with my efforts so far.</em></p> <p>I noticed that the default barebones <code>build.xml</code> would also import <code>custom_rules.xml</code>:</p> <pre><code>&lt;import file="custom_rules.xml" optional="true" /&gt; </code></pre> <p>So I created this file and started tinkering. This is what I have come up with so far:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project name="custom_rules" default="debug"&gt; &lt;target name="-pre-build"&gt; &lt;fail message="Please define app.packagename in your local.properties file." unless="app.packagename" /&gt; &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"&gt; &lt;classpath&gt; &lt;pathelement location="/usr/share/java/ant-contrib.jar"/&gt; &lt;/classpath&gt; &lt;/taskdef&gt; &lt;!-- How do I check for propertyregex? &lt;fail message="Depends on ant-contrib's propertyregex for app.packagename.path." unless="propertyregex" /&gt; --&gt; &lt;propertyregex property="app.packagename.path" input="${app.packagename}/" regexp="\." replace="/" global="true" /&gt; &lt;copy todir="build/" overwrite="true" encoding="utf-8"&gt; &lt;fileset dir="./"&gt; &lt;include name="AndroidManifest.xml" /&gt; &lt;include name="res/**" /&gt; &lt;include name="lib/**" /&gt; &lt;/fileset&gt; &lt;filterset&gt; &lt;filter token="CONFIG.APP_PACKAGE_NAME" value="${app.packagename}" /&gt; &lt;/filterset&gt; &lt;/copy&gt; &lt;copy todir="build/src/${app.packagename.path}" overwrite="true" encoding="utf-8"&gt; &lt;fileset dir="./src/isokeys/"&gt; &lt;include name="**" /&gt; &lt;/fileset&gt; &lt;filterset&gt; &lt;filter token="CONFIG.APP_PACKAGE_NAME" value="${app.packagename}" /&gt; &lt;/filterset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="-pre-clean" description="Removes output files created by -pre-build."&gt; &lt;delete file="build/AndroidManifest.xml" verbose="${verbose}" /&gt; &lt;delete dir="build/res/" verbose="${verbose}" /&gt; &lt;delete dir="build/lib/" verbose="${verbose}" /&gt; &lt;delete dir="build/src/" verbose="${verbose}" /&gt; &lt;/target&gt; &lt;!-- NOW CHANGE DIRECTORY TO build/ BEFORE HANDING BACK OVER TO build.xml!!! --&gt; &lt;/project&gt; </code></pre> <p>This sets everything up in <code>build/</code> <em>(which has the added bonus of keeping things neat and tidy)</em>, now the intention is for the sdk tools <code>build.xml</code> to run from this <code>build/</code> directory. However, I can't find any way of <code>cd</code>'ing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload