Commit Graph

30 Commits

Author SHA1 Message Date
Brett Chabot
1a363965c5 Fix ant install when -Dadb.device.arg not provided.
And also add the adb.device.arg support to ant uninstall.

BUG 2172690
2009-10-09 11:42:14 -07:00
Raphael
8eff7f5779 Support adb device-targeting arguments in ant scripts.
Example of usage:
  $ ant install -Dadb.device.arg=-d

SDK BUG 2172690

Change-Id: I196441f9aab888b1356b4fc0255842570be5140f
2009-10-08 15:05:09 -07:00
Piotr Gurgul
bca3ef5c25 Add tested.project.dir to classpath for install and debug
Now buildfile recognizes whether targets 'debug' or 'install' are being run for
an ordinary or test project and for the test projects classpath is extended
to enclose the tested project. Tested project is being compiled if necessary.
2009-09-24 18:17:22 -07:00
Piotr Gurgul
5b6f3cbe4b Add --no-locals to dx when dexing instrumented classes
Emma instrumentation modifies .class files in that way they cannot be processed
by dx without --no-locals option.
2009-09-23 18:20:25 -07:00
Piotr Gurgul
fa0062da90 Add legacy support for application.package property
application.package in android_rules.xml and android_test_rules.xml has been
replaced by manifest.package which value is taken from AndroidManifest.xml.
This is because old versions of build.properties contain already
application.package property which has precedence over the extracted one
and overrides it.

Change-Id: I909e145926169922ec6ec0e179ad88c413aa85b2
2009-09-22 17:31:14 -07:00
Piotr Gurgul
3cbe2b7943 Add automatic application package extraction from manifest
Automatic extraction of the application.package property has been added
leveradging xpath ant task. This reduces redundancy, removes hardcoded
application.package and solves bug with uninstalling test application
package. In order to function properly needs removing application.package
from build.properties file.
2009-09-21 21:44:00 -07:00
Piotr Gurgul
9a73cd9add Increase reusability of zipalign macrodef
debug-helper macro has been renamed to zipalign-helper to reflect better its
function. Two parameters for input and output packages have been introduced.
Macro has been additionally leveradged in 'release' target where zipalign
was previously called directly, duplicating the code.
2009-09-21 17:22:34 -07:00
Piotr Gurgul
fddd720cf2 Add global verbosity control for SDK ant targets
The user-configurable property 'verbose' has been introduced. It is set by
default to 'false' and switching in on enables verbose mode for all the
intermediate steps for a given target.
2009-09-21 16:33:30 -07:00
Piotr Gurgul
519e10746d Replace -no-sign and -debug-sign with macrodef attribute
Instead of setting property indicating if package should be signed
with debug key in separate targets, this information is being passed
as a package-helper macrodef parameter.
2009-09-15 16:46:21 -07:00
Piotr Gurgul
05bf40edec Reorganize android_rules and android_test_rules
Instrumentation-related targets have been moved from android_test_rules to
android_rules for better consistency. Chain of target dependencies has
been modified in order to make it more natural.
2009-09-15 14:55:32 -07:00
Piotr Gurgul
6edb5a108e Add ant-based code coverage support to Android SDK
Target 'run-tests' launches all the unit tests against the tested project.
Target 'coverage' emma-instruments the tested project's classes,
runs the tests against instrumented classes, collects code coverage data
and extracts it to human-readable form as report.html.
android_test_rules.xml contain additional rules for test projects.
Test projects are auto-recognized by presence of the tested.project.dir
property, which will be auto-generated for tests projects. Temporarily,
please add this property manually to the build.properties file.
Current version is mainly tested with default, android generated test projects.
This version includes also fixing relative to absolute paths for
properties which are most likely to be changed by user in external
property file.
2009-09-09 18:32:03 -07:00
Xavier Ducrohet
0614664583 Make ApkBuilder create filenames supported by older rules.
'ant install' must know the debug apk filename so newer naming scheme breaks
on older rule files (1.5 and earlier).
The fix is to check for the presence of the property naming the debug,
signed, unaligned package. If the property is present, then we use
the new naming scheme ({base}[-{config}]-debug-unaligned.apk), else we use
the old one ({base}-[-{config}]-debug.apk).

Also merge the install/reinstall targets, since 'adb install -r <file>'
works even if the apk was not yet installed.

Change-Id: Id0670610a6539a3f48c955756955f950039c3cd0
2009-08-26 14:58:56 -07:00
Piotr Gurgul
e2c37d4f44 Ant clean target added
Removes output files created by other targets.
2009-08-25 17:19:00 -07:00
Piotr Gurgul
2968aa3020 Ant properties names changed
application-package to application.package
sdk-location to sdk.dir
android-jar to android.jar
android-aidl to android.aidl
in order to make their names compliant with the ant standards and rest
of the property names.
Properties names in alias rules deliberately ommited in this CL.
Some minor style changes introduced.
2009-08-24 23:06:56 -07:00
Piotr Gurgul
832c859693 Refactoring of android_rules.xml file
This is a new CL because of merge conflict in the old one.
Naming changed to 'property.name' style for property names.
Property 'value' attributes changed to 'location' for props containing location.
Suffix '.dir' added to properties' names indicating directories.
'-description' prefix added to intermediate/internal targets.
'*.location' properties removed, as 'location' attribute should take care of
full paths, adding $basedir implicitly, so hopefully there is no need to
define them explicitly.
External property names (taken from other files or hardcoded somewhere)
stayed untouched in this CL.
Some minor improvements to comments in order to make them more consistent.
2009-08-22 13:15:26 -07:00
Xavier Ducrohet
c86903288c Fix target for ApiDemos (API is now 4)
Also add some progress output to the ant rules.
2009-08-21 15:59:02 -07:00
Xavier Ducrohet
954e80e5ca Make the Ant script sign and zipalign release builds.
It will also align debug builds.
BUG: 2052744
2009-08-13 21:13:53 -07:00
Xavier Ducrohet
5b13066ef1 On project creation, put the app package in build.properties
This enabled 'ant uninstall' to work.
Also, add an error message to the uninstall rules in case the property
is not defined.

BUG: 2050451
2009-08-13 11:18:28 -07:00
Xavier Ducrohet
55b0512f2b Fix the uninstall target in the Ant build script.
the uninstall parameter is a value (the application package), but the Ant
task was incorrectly using "path" for the argument.
2009-05-26 12:25:28 -07:00
Raphael Moll
01c1ad4af5 AI 147177: am: CL 147175 ADT #1801951: "adb.exe" misses the dot in android_rules.xml
Original author: raphael
  Merged from: //branches/cupcake/...

Automated import of CL 147177
2009-04-21 13:07:50 -07:00
Xavier Ducrohet
aa3b63abf4 Automated import from //branches/donutburger/...@141594,141594 2009-03-24 20:36:19 -07:00
The Android Open Source Project
59008ebc2c auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:19 -07:00
The Android Open Source Project
52d4c30ca5 auto import from //depot/cupcake/@135843 2009-03-03 19:29:09 -08:00
The Android Open Source Project
d4aee0c0ca auto import from //depot/cupcake/@135843 2009-03-03 18:28:16 -08:00
The Android Open Source Project
74a996a2c7 auto import from //branches/cupcake/...@132569 2009-02-20 07:38:28 -08:00
The Android Open Source Project
ff4b5f241f auto import from //branches/cupcake/...@132276 2009-02-19 10:57:29 -08:00
The Android Open Source Project
87a88c4f03 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:48 -08:00
The Android Open Source Project
b8d704a517 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:07 -08:00
The Android Open Source Project
95cf464c5a auto import from //branches/cupcake/...@125939 2009-01-09 17:51:19 -08:00
The Android Open Source Project
e943f2fd8e Code drop from //branches/cupcake/...@124589 2008-12-17 18:04:04 -08:00