aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks/src/com/android/ant/SetupTask.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix "ant test" + misc clean up / reorganization of build.xmlXavier Ducrohet2012-04-161-46/+0
| | | | | | | | | | | | | | | | - Split NewSetupTask in several tasks to make things more flexible. Particularly this allows more targets to get access to the project type (app, lib, test, ...) as it's not so computive intensive. - Fix test project to give them access to the full tested project's classpath. - Fix support for projects that test themselves. - Make sure library projects are instrumented when using the emma target. Change-Id: Ia0c9564eacee2521e7cbd5154b8a85ea287ad4fd
* New library project mechanism.Xavier Ducrohet2011-08-171-572/+15
| | | | | | | | | | | | | | | | Libraries now generate a jar file that is used by the projects referencing them, instead of having the main projects compile the library source code themselves. This means we can remove the link mechanism that created linked folder in ADT and instead use a container that is lazily initalized to be all the jar files of the libraries. Also merged all 3 Ant build files (main_rules, lib_rules, test_rules) into a single build.xml that can build any kind of projects. Lot's of improvement in there too. Much cleaner. Change-Id: I98307e25cd76722e8595938528e6ef57a7e226ad
* Move the sdk io classes to common.jarXavier Ducrohet2011-02-241-2/+2
| | | | Change-Id: I59a7b770071707ed058aa104bab8a16aa8950d56
* Add Renderscript support to the ADT builders.Xavier Ducrohet2011-01-311-4/+8
| | | | | | | | This uses the new JavaGenerator mechanism so that all that's needed is to run llvm-rs-cc on a given list and parsing the dependency file that's created. Change-Id: Ib4928c980422dfe1944bc720c77bf6ae5be4c34a
* Add renderscript support to the Ant build system.Xavier Ducrohet2011-01-181-0/+6
| | | | Change-Id: Iba1c956d33725716923da89b788f7f8d14524e41
* Add Ant version check in setup task.Xavier Ducrohet2010-12-081-0/+42
| | | | Change-Id: Id2237ae2fd64a1ccae5b1a1957099c218cdaf9a5
* Check for platform-tools presence.Xavier Ducrohet2010-10-131-0/+11
| | | | Change-Id: Ieaf6e42bc67829b01ebb0fa799bc615f85fc1a6d
* Use proguard for release builds through Ant.Xavier Ducrohet2010-09-241-27/+12
| | | | | | | | | | | | | | | This is only activated if default.properties contains a property "proguard.config" with the name of a proguard config file. Some clean-up in the Ant tasks and in the name of the properties used by the rules and the custom tasks to make them clearer. Added a new test app with a project using a jar file as well as a library using a jar file. Change-Id: Ia8f4d873025993d454c0a484e61d47ae679ea79c
* Support for debug build in Ant.Xavier Ducrohet2010-09-021-171/+55
| | | | | | | | | | | | | "ant debug" now automatically insert debuggable=true in the manifest. Also cleaned up a lot of the Ant stuff (versioned Ant rules, support for importing different rules files based on compatibility computation). This is rendered moot with our new single aapt executable. The ant rules will now evolve alongside aapt, and there will not be mismatch between the two. Change-Id: Iaf309f40e6ab4a0204dfbdb428cfb569bf5ca3b3
* Ant: ensure SDK path ends with dir separator.Raphael Moll2010-08-101-13/+17
| | | | | | SDK Bug: 2906094 Change-Id: Ic4053c97c8dd5a32a2276e22644b5e09c91d52f0
* Ant support for library depending on other libraries.Xavier Ducrohet2010-06-291-26/+138
| | | | Change-Id: Ief8261327f7917d158fc8ad4dd4e4c3d322bbce2
* Fix NPE when a library does not have a libs folder.Xavier Ducrohet2010-05-071-3/+5
| | | | Change-Id: I382fb659073a8d2df8d018acde37d4769ac40cc0
* Add support for code-less project.Xavier Ducrohet2010-05-061-1/+6
| | | | Change-Id: I09e8e5b40df3b8da4b34fe4f000e98263ea5bc55
* Add support for using newer Ant rules distributed by the tools.Xavier Ducrohet2010-05-051-6/+46
| | | | | | | | | | | | | | | | | Right now, the Ant rules are packaged with each platform. This is a problem when we want to release newer versions of the rules, as we would have to respin newer rev for all major platforms just for that. The new mechanism has the Ant rules both in the tools folder and in the platforms. The platform indicates which versions it supports (support is based on the features of external tools such as aapt, aidl and dex). The custom tasks can figure out a newer but still compatible (ie not relying on newer options in aapt/aidl/dex) version from the tools folder and then uses this newer version. Change-Id: I763533ec85fa9647ecf96ac6cbaefbfd1ad68fb0
* First step of multiple apk support.Xavier Ducrohet2010-05-031-69/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New export type project to handle exporting a single app represented by multiple projects (for different minSdkVersion for instance). - Cleaned-up the current Ant tasks and Eclipse builder to not deal with ApkSettings anymore. It's not possible to generate more than one APK in a single pass. The export project will handle this and call out the normal build system to export each variant. Make older (deprecated) attribute actually output a warning. - Ant rules r3 now with support for multi apk export. Lots of clean up, add new properties to be overriden by the multi-apk export task, make older one overrideable too. - Better handling of older rules, older tasks, etc... in the SetupTask used by the normal build. - Add split by ABI to ApkSettings and use it in the new multi apk export. - New custom task for multi-apk export. Replaces SetupTask for export-type projects. Calls out to the project's build.xml after setting/overriding properties. This also override the project's versionCode with a new composite one made of different values. Also uses a different build.xml, so added a new template: build.export.template. Very much a work in progress. Still to do: Add other types of APK split, create/update export projects, export the build log, ... Also, we need to refactor the normal build rules to avoid so much duplication! Change-Id: I57a565c60d097a5eabb40108ae1fa8cb209f2380
* Add rev 3 of the ant rules.Xavier Ducrohet2010-04-271-4/+8
| | | | | | | For now they are the same as the r2. Also modified SetupTask to deal better with older tools. Change-Id: I22ff809ace3ff81fb6852a707165165a9b4ec88a
* Add support for the new Ant rules files.Xavier Ducrohet2010-03-181-15/+43
| | | | | | | | | | | The new Ant rules files are located in <platform>/ant instead of <platform>/templates Also, the name of the file now include the revision number to make it easier to update them, so the custom task must deal with this. Change-Id: I8fff9656b17c5afad8f22b23052dfca4c598d712
* Move ant.prop to sdk.prop and up a folder.Xavier Ducrohet2010-03-111-4/+14
| | | | | | | | | | | | | | | | this file is meant to have general sdk properties, not just Ant ones. Also separated the library support from the Ant build version. It's clearer whether or not libraries are supported, and it's not just tied to Ant anyway (ADT needs to know as well). Finally use that new property to do checks on library support in both the custom Ant tasks and ADT. Depends on a CL in development.git (sdk.atree change). Change-Id: I77d229ed3fd60f0468b1d3d31f7cf147b03a32fb
* detect too recent version of the ant rules and display an error.Xavier Ducrohet2010-02-241-1/+45
| | | | | | | | This is to solve the case where a user somehow update a platform component but not the tools. the custom Ant tasks will detect the revision of the ant rules and fail if it's too recent. Change-Id: Ica91a500ca980f9ed5f3a7c4fb09b85a63b8037b
* Move sdklib.internal.io.* into sdklib.ioXavier Ducrohet2010-02-241-1/+1
| | | | | | | Some other "public" API (AndroidManifest) depends on it so it should be public too. Change-Id: I88cd299bbd60df8f4dac5fe029bb52c0c0c2f16c
* Improve the IAbstractFile/Folder classes.Xavier Ducrohet2010-02-231-2/+2
| | | | | | | | - Add setContent to the file class - add listMembers to the folder class - extend java.io.File instead of using a delegate. Change-Id: Ib6434b37c8cceb6661bc6a17ae678a56d2c243f2
* ADT: Library support: source folder and pre-compiler.Xavier Ducrohet2010-02-231-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step in the library support. For each library, create a source folder in the main project that is linked to the source folder of the library project. The linked resources use a path variable named after the library in the format: _android_<library name>. These variables are always created when the link is created. For now the link is recreated all the time, but we could do a check and not redo it if it's already done. Additionally, the pre-compiler creates the R class from the res folders of the main and library projects. Some misc fixes/clean-ups: * Fix an issue with the new ProjectState where opening a project would not trigger a load of its target data. * Changed the lock for all SDK operation: - moved the lock in Sdk accessible as Sdk.getLock() - made the few Sdk method that used their own synchronize block use the same lock as all others. * removed the builders project and moved its content to sdklib This was meant as a way to share code between the Eclipse builders and the Ant tasks but sdklib is already used by both, so it's better to put the code in sdklib than have yet another project. Change-Id: Ibfa449c7a809f28e428c03bbda8215969717ecde
* Check whether the project's target supports libraries.Xavier Ducrohet2010-02-161-2/+12
| | | | | | | | Check is done when: - a library is added to a project through "android update project" - a project is compiled through Ant Change-Id: I09993b9aac5ad32a84335647429fc52fa2babaf9
* Add support for external jar files in library project.Xavier Ducrohet2010-02-101-6/+30
| | | | | Bug: 2294012 Change-Id: I88bc99d9c3ac4135aac4c5af7995aca25bf5c4ee
* Add support for library project in the Ant build system.Xavier Ducrohet2010-02-101-2/+86
| | | | | | | | | | | | | | | | new build rules file for library only. Should probably extract the parts that are common to this and the default rules file. SetupTask now sets up some properties and Path reference based on the libraries. They are used by: - aapt task (now also used for the generation of R.java) which use all the res folders of the main project and the libraries, and generate an R class for the project and the libraries. - javac which compiles the src/ folders of the libraries. Bug: 2294012 Change-Id: Ie550dcf0ba8ea57696ebb1c2a61d4c6d73307bdf
* Error when building application with package that has a single segment.Xavier Ducrohet2010-01-221-0/+15
| | | | | Bug: 2261147 Change-Id: I92660ca99eaa7e9d180402683e5c9be0f3dc28d4
* Update the project creation (from the command line):Xavier Ducrohet2009-09-271-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the distinction between the activity class name, manifest entry, fully-qualified name, and tested activity for the template place-holders. Test activity names now directly contain the full name (including the "Test" prefix) instead of the template adding it. This is required by the new 'create test-project' - New action: create test-project This requires a path to the main project. It reads the package, activity name and target from the main project. The activity is read from the manifest and can be in a more complex form than previously expected (for instance .subpackage.MyClass, instead of simply MyClass). This is what required the re-work the activity related template place holders. Options: -m --main Location path of the project to test, relative to the new project [required] -n --name Project name -p --path Location path of the new project [required] Example: for 2 projects MyProject and MyTests located in the same folder, calling from their parent folder. android create test-project -p MyTests -m ../MyProject - build.properties now only gets application.package for older targets as the new one get it directly from XPath - Remove AndroidXPathFactory from the anttasks project as it was already in sdklib which is a dependency. - Removed IntelliJ templates for the SDK. We haven't supported them for a while, and now that IntelliJ has built-in support for Android, it's not that useful anymore. While there is the command line parameters for 'update test-project' it's not yet implemented. Change-Id: I663d4cb7f439bb2abfe866f893e58f4d13aff975
* Add warning on mismatch minSdkVersion.Xavier Ducrohet2009-09-231-9/+49
| | | | | | | | | | This is for both Ant and ADT. For Ant, also added a check for non-integer values when the platform is not a preview. BUG:2118374 Change-Id: Ic8ec533d66a31d9e4b51c9c38b5eaab97bca7414
* Add ant-based code coverage support to Android SDKPiotr Gurgul2009-09-091-3/+15
| | | | | | | | | | | | | | | 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.
* Make sure older rules files can find the SDK Location.Xavier Ducrohet2009-08-251-1/+6
| | | | Change-Id: Idb2463f07c233015927181e79955ae71e10dcb19
* Ant properties names legacy supportPiotr Gurgul2009-08-251-3/+21
| | | | | Support for old property names in SetupTask.java, in order to maintain compatibility with Donut and earlier.
* Ant properties names changedPiotr Gurgul2009-08-241-2/+2
| | | | | | | | | | | 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.
* Add support for add-on based on preview of platforms.Xavier Ducrohet2009-07-221-2/+5
|
* Refactored AndroidXPathFactory into sdklib.Xavier Ducrohet2009-07-221-30/+4
|
* Enforce codename value for minSdkVersion in the Ant build.Xavier Ducrohet2009-07-211-0/+60
| | | | | If the Ant project is targetting a preview platform, the manifest must declare minSdkVersion to be the platform codename.
* Add support for preview versions of platforms.Xavier Ducrohet2009-07-201-17/+17
| | | | | | | | | | | | | | | | | ro.build.version.codename is a new property indicating whether a platform is in its release form (value = REL) or in development (value = dev branch name such as Donut). When the codename indicates a development/preview version then the API level must be ignored and this codename is used as a unique identifier of the platform. IAndroidTarget has been changed to return an instance of a new class AndroidVersion instead of the api level directly. This class helps deals with the logic of comparing version from targets or devices. This change impacts all of the sdk manager to deal with targets identified by codename instead of api level. This in turn impacts everything that relies on the sdkmanager: ADT (build, launch, project creation), the AVD manager, the SDK updater.
* Move some classes that have non ready APIs to internal packagesXavier Ducrohet2009-05-131-1/+1
| | | | | - com.android.sdklib.avd -> com.android.sdklib.internal.avd - com.android.sdklib.project -> com.android.sdklib.internal.project
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+208
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-208/+0
|
* auto import from //branches/cupcake/...@132569The Android Open Source Project2009-02-201-0/+208