aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks
Commit message (Collapse)AuthorAgeFilesLines
* Fixed error in ApkBuilderTask for jar files with resourcesClaes Elgemark2012-01-251-19/+0
| | | | | | | | jar files specified with <jarfolder> are searched twice for resources. The build fails when resources are found the second time. Change-Id: I4ce9028df7116587396aa67e0853eab34ba854fe
* Add support for BuildConfig class to ADT.Xavier Ducrohet2011-11-091-4/+12
| | | | Change-Id: I17d4eae699e55e41c26c6125175b893a3012699e
* Merge "Code cleanup: make sure FileInputStreams are closed."Raphael2011-10-181-1/+14
|\
| * Code cleanup: make sure FileInputStreams are closed.Raphael2011-10-131-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various places of the code construct a new FileInputStream on the fly and give it to another method. One many occasions the stream is never properly closed, which can lock files on Windows. 2 specific cases: - Properties.load() doesn't seem to close its input (when looking at the source bundled with the JRE). - The doc of InputSource (used by various XML parsers like the pull parser) indicates the caller should in general not close the stream and the parser itself should do it. Change-Id: I622b54a22f97ed2c9c8fdc56ccde331207d9d212
* | Fix NPE when building project with no code.Xavier Ducrohet2011-10-143-2/+7
| | | | | | | | | | | | | | | | The lack of dex file made the Ant package task throw an NPE. Also some minor typo fix. Change-Id: Ic617ee66017c402f211f5400baf5a00eb7e6cff5
* | Improve indirect library dependency support.Xavier Ducrohet2011-10-142-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously with the following setup: Main app depends on Lib1, Lib2. Lib1 and Lib2 both depends on Lib3. Lib3 would be compiled 3 times, as the main app would attempt to build it and then Libr1, and Lib2 would do it too. Of course it wasn't actually built 3 times. After the first time it would do nothing, checking dependencies and do nothing. However, for projects will a lot of libraries and a lot of indirect dependencies this could slow down a lot compilations, as the build would spend its time checking whether to build the same library many times. This ensure that only the main project attempts to build all of its library dependencies (direct and indirect), in the right order of course. When libraries are built they are told (through the "only" target) to not build their dependencies. Change-Id: Ie80f32a96e3c473d897aca5d05bf6fe9ea086884
* | Add BuildConfig to ant SDK project.Xavier Ducrohet2011-10-147-30/+248
|/ | | | | | | | | | | | | | | The BuildConfig class contains a single boolean constant called DEBUG which is true only for debug/instrumented builds. This allows developers to create debug only code that's automatically stripped from release builds. Also fixed some issues with dependency check for other tasks, notably the aapt task that would always find new files due to not filtering out files that are ignored by aapt itself (hidden files, version control files, etc...) Change-Id: I4391a87c064a185d6b337ca46e3a9f0e43c5174d
* Improved RenderScript support in SDK build.Xavier Ducrohet2011-10-107-232/+338
| | | | | | | | - renderscript output is now in bin/res/ instead of res/ - Ant build system properly handle dependencies to only recompile files that need it. Change-Id: Ic2cd4487a26e7a7fcb0b475ee52fa0ccf8a07c0b
* Ant build didn't use -non-constant-id for libraries!Xavier Ducrohet2011-10-061-0/+9
| | | | Change-Id: I966b8796008b87dd3e6101d8c6d09271e2621c52
* Also process and cache the png files in libraries.Xavier Ducrohet2011-09-281-1/+4
| | | | | | | | | | | The png in the libraries were not processed by the crunch step. Because aapt never processes png files anymore (relying on the crunch step to do it), the png files in libraries were never processed. While this is less a problem for standard png files, this completely breaks 9-patches that must be processed to actually behaves as 9-patch. Change-Id: I0a1fe14ea34f6d36a368b456494410945afc3c44
* Fix dependency support for aild.Xavier Ducrohet2011-09-231-0/+5
| | | | | | | The aidl task doesn't use InputPath so it fails to check files for modifications. Change-Id: I589dda40538ed8cb16904407693329979536c5f5
* Make the zip align ant step check timestamp on intput/output.Xavier Ducrohet2011-09-231-0/+113
| | | | | | If the output is more recent than the input, zipalign does nothing. Change-Id: Ic1d7518a28fbb2db8895903e5cd0fd2976931b41
* Add dependency support for ApkBuilder ant step.Xavier Ducrohet2011-09-236-157/+309
| | | | Change-Id: I7230a2aa3df5fab8b420f1ed2f359621fbda7f5a
* Make sure renderscript's -target-api receives 11+Xavier Ducrohet2011-09-191-4/+14
| | | | Change-Id: Id4012b8c86212b3874c0820ba9c71136083cd5f2
* Improve error message if manifest has wrong minSdkVersion.Xavier Ducrohet2011-09-161-2/+2
| | | | Change-Id: I00ceed502f0a756183198ebbe77da8f2e7fb303d
* Pass -target-api to the renderscript compiler.Xavier Ducrohet2011-09-152-9/+45
| | | | | | | This allows to use a single llvm executable to target all API versions. Change-Id: Ib27f7fc9e54c548d31fc98fc323f439cb99218d5
* Make the dependency graph use extension restrictions per folder.Xavier Ducrohet2011-09-015-52/+94
| | | | | | | | | | | | | | | | Before there was a way to filter touched file by extension(s) but this was for all input folders. Now each input folder can have a different set of extension restrictions. This will allow apkbuilder to use DependencyGraph and extension restriction for all its input folders. Also fixed an issue where aapt would not package the resources if an xml files was touched. This is because it didn't make a difference between compiling the resources for IDs and packaging the resource values. Change-Id: I797d3a24c6c1f999e9d412c4ff8aa826ed16fc09
* Add proper dependency support in the dex step of the Ant-based build.Xavier Ducrohet2011-09-015-114/+440
| | | | | | | | | | The dex step now generates a dependency file that is reused during following builds to check whether dex should occur. Also optimized the part that figures out if any dependencies have been modified/have gone missing. Change-Id: I7f6e915fc7b571ad973260daa506badced3a9c2a
* Add support for proper dependency detection in the aidl ant compilation step.Xavier Ducrohet2011-09-015-47/+193
| | | | | | | | | | Aidl compilation now generates dependency files that are reused on further compilations to only recompile files that needs it based on source files modifications. Also clean up output (and dependency) files when a source file is deleted. Change-Id: I3131463fd7939ffc4b5bbdfa49940e03f0249a28
* Rename default.prop/build.prop to project.prop/ant.propXavier Ducrohet2011-08-232-7/+7
| | | | | | | Opening projects in Eclipse will rename the file and "android update project" will do the same. Change-Id: I251881897c251eb07c9704eb9c2448cab47e5b83
* Prevent running debug and release targets at the same time.Xavier Ducrohet2011-08-231-1/+0
| | | | | | | This is not possible since they rely on the same properties which cannot be updated after they are set. Change-Id: I2fbc0f53b656f5906c2b026d8fd41d78a4461803
* Added extension specification to dependency checkJosiah Gaskin2011-08-182-7/+47
| | | | | | | | | | This change adds a parameter 'touchedextensions' that can be qualified with a colon-separated list of extension to consider during checks to see if prerequisite files have been modified. if this parameter is not set, files of all extensions will be checked to see if they have been modified. Change-Id: I9bd7e20b6e5341b3a0f3698ffdc2de10d286921c
* Change filename for dependency filesJosiah Gaskin2011-08-181-4/+3
| | | | | | | | This change updates the filenames for the dependency files to check in Ant to match the new names of the generated files by AAPT. (R.java.d and <AppName>.ap_.d respectively). Change-Id: I41d6aef96aec42c8074aa921801482e4c70363b6
* Remove obsolete code.Xavier Ducrohet2011-08-171-385/+0
| | | | Change-Id: I2881d7b5f01229b9da81c6134fc5dfdfb4aacff8
* New library project mechanism.Xavier Ducrohet2011-08-177-660/+720
| | | | | | | | | | | | | | | | 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
* Expose version.name property for aapt task.Tero Saarni2011-08-151-0/+14
| | | | | | | | | | The new property makes it possible to create ant build scripts that programmatically determine and set the versionName attribute during build. Similar property already exists for versionCode. Signed-off-by: Tero Saarni <tero.saarni@gmail.com> Change-Id: Ia36632ae029785563fc7c1bc8937034963016852
* Add support for aapt CrunchCache in ADT and AntJosiah Gaskin2011-07-211-0/+14
| | | | | | | | This change lets ADT and Ant use the crunch cache system set up in change I58271fb2. This commit is separate because sdk and framework are separate git repositories. Change-Id: If2828d157acad0b5adb812001e777c199e3c62fe
* Add support to Ant for packaging dependency checksJosiah Gaskin2011-07-181-22/+46
| | | | | | | | | | This change adds in support for making aapt generate a dependency file for the .ap_ package generated during resource packaging. Ant will then check this dependency file before calling aapt again and will only repackage resources if the dependencies have been modified in some way. Change-Id: I56462163c5dd064c1416bc43913f044df8ee9be1
* Add support to Ant for dependency checkingJosiah Gaskin2011-07-183-5/+355
| | | | | | | | This change adds dependency checking to the Ant generation of R.java. If no resources have been changed or added since the last generation of R.java then that call to aapt will be skipped. Change-Id: I262b94111316496fac54da8030a6d474dc30b584
* Adding support to ADT and ant for smart R.java genJosiah Gaskin2011-07-181-22/+12
| | | | | | | | | This change lets ADT and ant make use of the new --extra-packages flag in aapt to allow for all the R.java files to be generated using only one call rather than one call per library. Change-Id: Ibc060b1218010cfbae108f4f1aba2c25fe69a964
* Add missing notice files.Xavier Ducrohet2011-03-153-31/+206
| | | | | | | | | | Also fix some makefiles to make sure the notices are picked up. - move the makefile outside of the source folder. - resources are now in the source folder directly instead of being inside src/resources. It's much simpler. Change-Id: Ica8ee4c2bc8a9b035d23fc914d4137cdca7e567d
* Move the sdk io classes to common.jarXavier Ducrohet2011-02-243-3/+4
| | | | Change-Id: I59a7b770071707ed058aa104bab8a16aa8950d56
* Ant tasks and dependency clean up.Xavier Ducrohet2011-02-082-0/+2
| | | | | | | | | | | Give anttasks.jar a proper manifest with jar dependencies. Update the manifest of sdklib.jar with the common.jar dependency. The pre-setup section of build.xml has changed over time and really we should be able to control it so move it in $SDK/tools/ant/pre_setup.xml and import it into build.xml Change-Id: Iab707deccc0cdbe8d1a9db052ee6fb0762853394
* Add Renderscript support to the ADT builders.Xavier Ducrohet2011-01-312-8/+18
| | | | | | | | 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-185-4/+168
| | | | Change-Id: Iba1c956d33725716923da89b788f7f8d14524e41
* Add Ant version check in setup task.Xavier Ducrohet2010-12-081-0/+42
| | | | Change-Id: Id2237ae2fd64a1ccae5b1a1957099c218cdaf9a5
* Fix external jar support when building with proguard.Xavier Ducrohet2010-10-251-20/+21
| | | | Change-Id: I3dafb284770f475d70a212cbe22cdae6bff36ff7
* Merge "Project property cleanup."Xavier Ducrohet2010-10-151-12/+1
|\
| * Project property cleanup.Xavier Ducrohet2010-10-151-12/+1
| | | | | | | | | | | | | | | | | | | | | | Remove obsolete sdk-location on project update, don't use it as backup location anymore (main_rules.xml won't work with it anyway). Remove the old application.package properties since older platforms will use the new rules anyway. Change-Id: I5a5ec3d1289cf793dd0f98fb778bd84086976c52
* | Check for platform-tools presence.Xavier Ducrohet2010-10-131-0/+11
|/ | | | Change-Id: Ieaf6e42bc67829b01ebb0fa799bc615f85fc1a6d
* In some cases release build is actually a debug build.Xavier Ducrohet2010-09-291-5/+25
| | | | | | | If the manifest sets debuggable=true then this override the release build to be a debug build instead. Change-Id: Ib66bf9053cecfa7c19a02cefdbf187a20bd6da37
* Use proguard for release builds through Ant.Xavier Ducrohet2010-09-245-41/+116
| | | | | | | | | | | | | | | 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
* Display error for missing required attributes in ant tasksXavier Ducrohet2010-09-121-0/+8
| | | | Change-Id: I4a9babcda7a541a7defd226e36bb8f74f88853ed
* Support for debug build in Ant.Xavier Ducrohet2010-09-024-238/+66
| | | | | | | | | | | | | "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-102-19/+28
| | | | | | SDK Bug: 2906094 Change-Id: Ic4053c97c8dd5a32a2276e22644b5e09c91d52f0
* Ant support for library depending on other libraries.Xavier Ducrohet2010-06-291-26/+138
| | | | Change-Id: Ief8261327f7917d158fc8ad4dd4e4c3d322bbce2
* Support for aidl files in library project in the Ant build system.Xavier Ducrohet2010-06-283-2/+135
| | | | Change-Id: I3e36e6f4db60d3d979b24c2b88d496f453394127
* Move the exceptions out of ApkBuilder.Xavier Ducrohet2010-06-221-3/+3
| | | | Change-Id: I66e767cbd4f3f3521bb994b281140a433f63291f
* New ApkBuilder class.Xavier Ducrohet2010-06-221-102/+95
| | | | | | | | | | | this is meant to replace the one previously in apkbuilder.jar and the one in ADT, while being part of the public sdklib API so that other tools can use it if needed (to deprecate the command line version) Another changelist will rename the ApkBuilder classes inside ADT to make things less confusing. Change-Id: I13f2a09d8d507a85be33af3fe659d175819cb641
* Move Apkbuilder into sdklib.Xavier Ducrohet2010-06-163-5/+3
| | | | Change-Id: I88f7e6101b8c03157a320a6c9d9b7424ffbdc7f5