I have a refactoring of AndCooper ANY build for Android applications:
< ?xml version="1.0" encoding="UTF-8"?>< ?xml version="1.0" encoding="UTF-8"?> Build file to build Android Applications, not the apps test build Converting compiled files and external libraries into ${intermediate.dex.file}... Running zip align on final apk... Installing ${out.debug.package} onto default emulator or device... Running tests ... Creating output directories if needed... Generating R.java / Manifest.java from the resources... Compiling aidl files into Java classes... Packaging resources Debug Package: ${out.debug.package} No key.store and key.alias properties found in build.properties. Please sign ${out.unsigned.package} manually and run zipalign from the Android SDK tools. Signing final apk... Release Package: ${out.release.package} Unable to run 'ant uninstall', manifest.package property is not defined. Uninstalling ${manifest.package} from the default emulator or device... Instrumenting classes from ${out.absolute.dir}/classes... Android Ant Build. Available targets: help: Displays this help. clean: Removes output files created by other targets. compile: Compiles project's .java files into .class files. debug: Builds the application and signs it with a debug key. release: Builds the application. The generated apk file must be signed before it is published. install: Installs/reinstalls the debug package onto a running emulator or device. If the application was previously installed, the signatures must match. uninstall: Uninstalls the application from a running emulator or device. run-tests: Runs EMMA tests coverage: Runs coverage report Downloading coverage file into project directory... Extracting coverage report... Cleaning up temporary files... Saving the report file in ${basedir}/coverage/coverage.html Build file to build Android Applications, not the apps test build Converting compiled files and external libraries into ${intermediate.dex.file}... Running zip align on final apk... Installing ${out.debug.package} onto default emulator or device... Running tests ... Creating output directories if needed... Generating R.java / Manifest.java from the resources... Compiling aidl files into Java classes... Packaging resources Debug Package: ${out.debug.package} No key.store and key.alias properties found in build.properties. Please sign ${out.unsigned.package} manually and run zipalign from the Android SDK tools. Signing final apk... Release Package: ${out.release.package} Unable to run 'ant uninstall', manifest.package property is not defined. Uninstalling ${manifest.package} from the default emulator or device... Instrumenting classes from ${out.absolute.dir}/classes... Android Ant Build. Available targets: help: Displays this help. clean: Removes output files created by other targets. compile: Compiles project's .java files into .class files. debug: Builds the application and signs it with a debug key. release: Builds the application. The generated apk file must be signed before it is published. install: Installs/reinstalls the debug package onto a running emulator or device. If the application was previously installed, the signatures must match. uninstall: Uninstalls the application from a running emulator or device. run-tests: Runs EMMA tests coverage: Runs coverage report Downloading coverage file into project directory... Extracting coverage report... Cleaning up temporary files... Saving the report file in ${basedir}/coverage/coverage.html
The other non-emma test targets are not added yet. The main idea is to have one build file that can be used in the app source and test source folders both through the IDE and later on through a continuous build server.
Filed under: Uncategorized

Go here to see the original:






ANT Build file http://androidoperatingsystem.net/2010/02/07/ant-build-file/
[Translate this post into any language - Click Here]