aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue when running Ant from outside of the project's folder.Xavier Ducrohet2012-03-231-1/+1
| | | | Change-Id: I431af7ec0745a1b7ccc34ee0a224ba6670b5bfff
* Merge "Enable passing of debug and optimization flags to slang in Ant builds."Xavier Ducrohet2012-03-221-2/+23
|\
| * Enable passing of debug and optimization flags to slang in Ant builds.Matt Kopec2012-02-281-2/+23
| | | | | | | | Change-Id: I8c6affe825b93eefb7ed60000740aa2783d93a20
* | am 99f28497: Merge "Close the dependency file after reading it."Tor Norbye2012-03-081-6/+10
|\ \ | | | | | | | | | | | | * commit '99f284970246c835142450d3366b69e526157f95': Close the dependency file after reading it.
| * \ Merge "Close the dependency file after reading it."Tor Norbye2012-03-081-6/+10
| |\ \
| | * | Close the dependency file after reading it.Kaloian Doganov2012-03-081-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dependency file will be eventually closed by the finalize() method at some point, but it is not known when. In the meantime, the Ant recipe continues execution and may try to move or delete this file. At that point the build may fail because the file is still open. The solution is to explicitly close the BufferedReader opened by DependencyGraph.readFile(), so the underlying file is closed as soon as reading is finished. Change-Id: If25f0d430191f4265a73a0e6adc3d81764c63758 Signed-off-by: Kaloian Doganov <doganov@projectoria.bg>
* | | | Ant build now sanitize jar files in setup task.Xavier Ducrohet2012-03-073-58/+102
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the list of jar files was sanitized (to remove duplicates) in the dex task, but this meant the full list (with duplicates) was passed to proguard when building in release mode. This changeset move the sanitization of the jar files in the Setup Task so that the script later only deals with a sanitized list. The means the content of libs/*.jar for the current project must be looked at in the task instead of later in the XML script. Change-Id: Ib5253b80ee7c1ded004bcdad6184e0900b7a7543
* | | Automatically add dependencies to Eclipse project.Xavier Ducrohet2012-03-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | add libs/*.jar from Library Projects, add Java-only projects only that referenced in Library Projects (recursively so that Java projects that reference other Java projects pull those in too). Also add jar files referenced by Java-only projects. Change-Id: Ic2b10107153e0576f5e6ba34d50bd3fef95c3fea
* | | Only generate the libraries R/manifest classes in the app project.Xavier Ducrohet2012-03-011-4/+5
|/ / | | | | | | | | | | | | If the project is a library itself then there's no need to generate them. Change-Id: I9896e2bac81979797cca10fc606c66e5139fc9a1
* | Ensure R/Manifest/BuildConfig classes are not added to the library jar file.Xavier Ducrohet2012-02-271-0/+48
|/ | | | | | | First, their are not needed there, second they can create a dx conflict if the library uses the same package as the app. Change-Id: I67b3f478d5d7ab79d02b6ece8b1eae31b8ed104e
* Fix issue when a project and its libraries use the same jar files.Xavier Ducrohet2012-02-241-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | This is only an issue in Ant because in Eclipse we don't automatically pull the jar files from libraries into the main project (we should somehow now that we have the Library Projects jar container that is dynamic). Right now we do a simple size/sha1 check on libraries that have the same name to figure out if they are the same version. If they are we only use one in the dex step (that notoriously fails to add the same class twice). If they are different we stop the build as it's an error (having two library projects depending on two different versions of a jar file should be an error as we can be sure the two versions are API compatible). For later: not use the file name only? find a way to version the libraries and to have them declare whether they are API compatible with older versions? Also added a hard-coded case for the Android Support Library. If both the v4 and the v13 are detected, use the v13 only as it includes the v4 already. New test apps. Three cases: - main and library projects with duplicate jar files that are identical - main and library projects with duplicate jar files that are NOT identical - main and library projects with v4 and v13 in the dependency list. Change-Id: I3a9abdcbec635d7c9d3228bdd105120f77178b27
* Merge "Add --rename-manifest-package option to aapt Ant task."Jean-Baptiste Queru2012-02-231-0/+22
|\
| * Add --rename-manifest-package option to aapt Ant task.Christopher Orr2012-02-141-0/+22
| |
* | Remove warning that minsdkVersion is lower than the compile target.Xavier Ducrohet2012-02-161-6/+1
| | | | | | | | | | | | | | This is not needed anymore now that Lint can check if this is actually a problem or not. Change-Id: I9f43f46033e07c44b78728e8582364b355ff1ccf
* | Fix ant issue where annotations.jar causes problems.Xavier Ducrohet2012-02-142-5/+7
| | | | | | | | Change-Id: Id08c9d187c75ff0e8e6998ef85204f28cf1ed252
* | Make some SDK project compile under Java 1.6Xavier Ducrohet2012-02-028-1/+111
| | | | | | | | Change-Id: I97189bda85530decff2ef8c4da3c43f186a6dba0
* | Merge changes Ifb914125,I32b31a30Xavier Ducrohet2012-01-302-4/+16
|\ \ | | | | | | | | | | | | | | | * changes: Fix issue where updated Java files don't trigger a new apk in ant. Automatically add annotations.jar on the classpath for API<=15
| * | Fix issue where updated Java files don't trigger a new apk in ant.Xavier Ducrohet2012-01-271-1/+1
| | | | | | | | | | | | Change-Id: Ifb914125481448c3ab6425e459c9b9e28e2fe4c4
| * | Automatically add annotations.jar on the classpath for API<=15Xavier Ducrohet2012-01-271-3/+15
| |/ | | | | | | | | | | | | This is to provide app some annotations used by the tools. Those annotations will be part of the API later. Change-Id: I32b31a3039e4fbb331682a84192252bd43c0f54a
* | 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