Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8473913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:29:05+00:00 2026-06-10T17:29:05+00:00

These 4 files (build.xml, local.properties, projects.properties, proguard.cfg) are auto-generated when running: android update project

  • 0

These 4 files (build.xml, local.properties, projects.properties, proguard.cfg) are auto-generated when running:

android update project –name TestApp –target 10 -p .

Updated project.properties

Updated local.properties

Added file ./build.xml

Updated file ./proguard.cfg

But I want the "auto-gen" build.xml to also include the following "pre-compile" code as well, is there a way to do that? Is there some "include" file or "template" file which can include that?

  <target name="config">

  <property name="config-target-path" value="${source.dir}/com/androidengineer/antbuild"/>

  <!-- Copy the configuration file, replacing tokens in the file. -->
  <copy file="config/Config.java" todir="${config-target-path}"
        overwrite="true" encoding="utf-8">
   <filterset>
    <filter token="CONFIG.LOGGING" value="${config.logging}"/>
   </filterset>
  </copy>

 </target>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:29:07+00:00Added an answer on June 10, 2026 at 5:29 pm

    The build.xml as generated by the android tool (at least when using Android SDK r20) contains this piece of code:

    <!--
        Import per project custom build rules if present at the root of the project.
        This is the place to put custom intermediary targets such as:
            -pre-build
            -pre-compile
            -post-compile (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})
            -post-package
            -post-build
            -pre-clean
    -->
    <import file="custom_rules.xml" optional="true" />
    

    So what I do to create additional targets or customize existing targets is to create a custom_rules.xml file with these new targets. Note that in my tests the targets needed to be nested in a <project> tag, so simply copy the first two lines of your generated build.xml to custom_rules.xml, and don’t forget about the closing </project> tag in the end. As custom_rules.xml will not be overwritten by android update your changes will be persistent and can be checked into your SCM tool of choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've generated ant build.xml for my android project, using android update project --name <project_name>
I am using Ant > 1.8 + Proguard 4.6 to build my Android project
I have a python project with this directory structure and these files: /home/project_root |---__init__.py
I have the following filters configured in my pom.xml: <build> ... <filters> <filter>build.properties</filter> <filter>user.properties</filter>
I've currently got four XML files that are used to build my Dependency Injection
I'm going through the Spring MVC tutorial. I have a build.xml and build.properties file
Is there a build-in way in C# to work with simple config files which
My website is built using php files. I use trade secret algorithms in these
Say I have all these files in a folder: something(34324).php something(34).php something(3433454546).php something(65565).php something(9887).php
I copied these files to C:\MonoWebServer. xsp2.exe xsp2.exe.mdb Mono.WebServer2.dll Mono.Security.dll I registered Mono.WebServer2.dll &

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.