From faf952695b0f75c8b75d5d1ca158d3cfed29fa75 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 3 Jul 2012 13:55:10 +0200 Subject: [PATCH] build.xml updated --- build.xml | 1080 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 628 insertions(+), 452 deletions(-) diff --git a/build.xml b/build.xml index 5d36bb5e7..c2405aafc 100644 --- a/build.xml +++ b/build.xml @@ -1,92 +1,13 @@ - - - - - - - - - - - - - - - - - - - + + + - - - + + + + + + + + + + + + + + + + + + + - + - + + + @@ -141,41 +94,7 @@ - - - - - - - - - - - - - - - - - + @@ -187,7 +106,9 @@ - + + + @@ -196,16 +117,22 @@ - + + + + + + + @@ -217,8 +144,13 @@ - + + + + + + + @@ -255,7 +187,20 @@ - + + + + + + + + + + + + + @@ -268,7 +213,7 @@ - @{elseText} + @{elseText} @@ -290,7 +235,7 @@ - @{elseText} + @{elseText} @@ -317,7 +262,7 @@ - + @@ -325,9 +270,7 @@ + verbose="${verbose}"> @@ -359,9 +302,9 @@ buildType="${build.is.packaging.debug}/${build.is.signing.debug}"> - + - + @@ -385,7 +328,7 @@ - Running tests ... + Running tests ... @@ -396,7 +339,7 @@ - + @@ -423,7 +366,7 @@ - Uninstalling @{app.package} from the default emulator or device... + Uninstalling @{app.package} from the default emulator or device... @@ -432,88 +375,126 @@ - + + + - - + + + + + + + + + + + + + Project Name: ${ant.project.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Switching between debug and non debug build: Deleting previous compilation output... + + + + + + + + + + + + + Switching from instrumented to non-instrumented build: Deleting previous compilation output... + + + + + + + + + + + + + + - + - + - + - - - + - - - - - - - - - - - - - - - - - Gathering info for ${ant.project.name}... - - - - - - - - - - - - - + + + + + - + + + + + @@ -525,30 +506,79 @@ - - - - - - + + + + + + + Resolving Build Target for ${ant.project.name}... + + + + + + + ---------- + Creating output directories if needed... + + + + + + + + + + ---------- + Resolving Dependencies for ${ant.project.name}... + - + + + + - Building Libraries - - - ############################################ - **** Back to project ${ant.project.name} **** - ############################################ + + + + + + ---------- + Building Libraries with '${project.libraries.target}'... + + + + + + + @@ -561,53 +591,24 @@ - Building tested project at ${tested.project.absolute.dir} + ---------- + Building tested project at ${tested.project.absolute.dir} with '${tested.project.target}'... - - ############################################ - **** Back to project ${ant.project.name} **** - ############################################ + + + + + + + - - - - - - - - - - - - - - - - - - - - Switching from instrumented to non-instrumented build. - Deleting previous compilation output: - - - - - Creating output directories if needed... - - - - - - - - + + + + + - ---------- - Handling aidl files... - + Handling aidl files... + - ---------- - Handling RenderScript files... + ---------- + Handling RenderScript files... + resFolder="${out.res.absolute.dir}/raw" + targetApi="${project.minSdkVersion}" + optLevel="${renderscript.opt.level}" + buildType="${build.is.packaging.debug}" + previousBuildType="${build.last.is.packaging.debug}"> - ---------- - Handling Resources... + ---------- + Handling Resources... + libraryResFolderPathRefid="project.library.res.folder.path" + libraryPackagesRefid="project.library.packages" + ignoreAssets="${aapt.ignore.assets}" + proguardFile="${out.absolute.dir}/proguard.txt"> + + ---------- + Handling BuildConfig class... + + @@ -660,68 +685,78 @@ - - - - - - - + + + + + + classpathref="project.javac.classpath" + fork="${need.javac.fork}"> - - - + + + + + + Instrumenting classes from ${out.absolute.dir}/classes... + + + + + + + + + + + + + + + + + - Creating library output jar file... + Creating library output jar file... - Custom jar packaging exclusion: ${android.package.excludes} + Custom jar packaging exclusion: ${android.package.excludes} + + + - + - - - - Instrumenting classes from ${out.absolute.dir}/classes... - - - - - - - - @@ -762,7 +797,7 @@ all the jar files separated by a platform path-separator. Each path must be quoted if it contains spaces. --> - + @@ -772,31 +807,43 @@ - + - + - + + + + + + + - @${proguard.config} - -injars ${project.jars} + -include "${proguard.configcmd}" + -include "${out.absolute.dir}/proguard.txt" + -injars ${project.all.classes.value} -outjars "${obfuscated.jar.file}" - -libraryjars ${android.libraryjars} + -libraryjars ${project.target.classpath.value} -dump "${obfuscate.absolute.dir}/dump.txt" -printseeds "${obfuscate.absolute.dir}/seeds.txt" -printusage "${obfuscate.absolute.dir}/usage.txt" @@ -846,33 +893,55 @@ Some custom apk with specific configuration have been declared in default.properties. --> - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -896,25 +965,44 @@ + + + - - + + + + - + - + + + + + + + + + + + + + + @@ -922,6 +1010,9 @@ + + + @@ -930,14 +1021,15 @@ - + - Debug Package: ${out.final.file} + Debug Package: ${out.final.file} + @@ -964,16 +1056,27 @@ - + - - - + + + + + + + + + + + - + + + @@ -993,15 +1096,16 @@ - No key.store and key.alias properties found in build.properties. - Please sign ${out.packaged.file} manually - and run zipalign from the Android SDK tools. + No key.store and key.alias properties found in build.properties. + Please sign ${out.packaged.file} manually + and run zipalign from the Android SDK tools. + proguard.config is ${proguard.config} @@ -1010,6 +1114,7 @@ + Proguard.config is enabled @@ -1020,6 +1125,7 @@ + @@ -1028,12 +1134,15 @@ - + + + ************************************************* @@ -1049,54 +1158,44 @@ - - - - - - - - - - - - - - - + - Signing final apk... - Signing final apk... + + keypass="${key.alias.password}"/> - - Release Package: ${out.final.file} + + Release Package: ${out.final.file} - + + + + + + + @@ -1117,13 +1217,15 @@ - Instrumented Package: ${out.final.file} + Instrumented Package: ${out.final.file} - + + + @@ -1131,43 +1233,67 @@ - - + - + + + + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + value="/data/data/${tested.project.app.package}/coverage.ec" /> @@ -1179,30 +1305,37 @@ - Downloading coverage file into project directory... + Downloading coverage file into project directory... - + - Extracting coverage report... + Extracting coverage report... + + + + + + + + + - + - - - - + + - + - Cleaning up temporary files... - - - Saving the report file in ${basedir}/coverage/coverage.html + Cleaning up temporary files... + + + Saving the report file in ${out.absolute.dir}/coverage.html @@ -1211,7 +1344,9 @@ - + + + - + - Installing ${out.final.file} onto default emulator or device... + Installing ${out.final.file} onto default emulator or device... + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1273,45 +1432,50 @@ description="Installs (only) the release package." /> - - - - - - + - + - Could not find application package in manifest. Cannot run 'adb uninstall'. + - + + + + + + + + + + + expression="/manifest/@package" output="tested.project.app.package" /> - + - + - Could not find tested application package in manifest. Cannot run 'adb uninstall'. + @@ -1320,6 +1484,10 @@ + + + + @@ -1330,13 +1498,19 @@ (tested projects and libraries)at the same time using: 'ant all clean' debug: Builds the application and signs it with a debug key. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps debug' release: Builds the application. The generated apk file must be signed before it is published. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps release' instrument:Builds an instrumented package and signs it with a debug key. test: Runs the tests. Project must be a test project and must have been built. Typical usage would be: - ant [emma] debug installt test + ant [emma] debug install test emma: Transiently enables code coverage for subsequent targets. install: Installs the newly build package. Must either be used @@ -1348,8 +1522,10 @@ installd: Installs (only) the debug package. installr: Installs (only) the release package. installi: Installs (only) the instrumented package. - installt: Installs (only) the test and tested packages. + installt: Installs (only) the test and tested packages (unless + nodeps is used as well. uninstall: Uninstalls the application from a running emulator or - device. + device. Also uninstall tested package if applicable + unless 'nodeps' is used as well.