aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks
Commit message (Collapse)AuthorAgeFilesLines
* Allow lint cli --sources to specify a path, and use from ant lintTor Norbye2012-08-061-0/+22
| | | | | | | | | | | | | | | First, this changeset allows the arguments passed to --sources and --classpath (renamed from --classes) to specify not just a directory, but to specify a path as well. This might make it easier to invoke lint from scripts if you have a path variable, so you don't have to split it into multiple arguments. Second, it makes the lint task in ant use these, such that any build.xml customizations to the source paths or class paths are automatically used rather than relying on lint's default structure check. Change-Id: Id8e4caf0010d7fd7245844b3099b5dc0607f0aba
* Add lint target for antTor Norbye2012-07-232-0/+87
| | | | | | | | | | | | | | | | Running "ant lint" will now run lint on the project, and dump out the errors to the console as well as also export the errors to lint.xml and lint.html int the bin/ directory. This changeset also modifies the lint CLI to allow multiple simultaneous result reporters - so you don't have to run lint twice in order to get both an .xml and an .html report for example (which is useful when you're running lint on a continuous integration server, and you want the .xml file for the lint plugin trend graph and the html file as a user readable report to click through to from the build page.) Change-Id: Idf8f3f5de0857eb9e7180267a066ae933640682d
* Fix renderscript compilation from Ant.Xavier Ducrohet2012-07-101-2/+7
| | | | Change-Id: Ie9fa05173a5e4e1c7cae48cabb37f3cfe7d085cb
* Fix parsing SDK Tools in ant tasks.Xavier Ducrohet2012-07-092-7/+10
| | | | Change-Id: Id1db4d2fc318b9318fcd0b7cb204f7ffe0d8429e
* Fix Ant task for 1.8.3 which seems more strict than 1.8.2Xavier Ducrohet2012-06-221-8/+8
| | | | Change-Id: Id88bc5d12d007c4c94ca11b7eddfc911fbd7bddb
* Fix minor errors when used with Eclipse4.Siva Velusamy2012-06-221-14/+17
| | | | Change-Id: Ia31c45715530f58ac293f61185b5a45f71fab4f5
* Add lib source folders to the emma report.Xavier Ducrohet2012-06-151-1/+1
| | | | | | | This allows seeing the library source code in the HTML report. Change-Id: I30cd9fa99d2962bb4c12cba6f2ba044857836b93
* Fix issue where libraries were not getting instrumented.Xavier Ducrohet2012-06-158-147/+277
| | | | | | | | | | | | | | | | | | | | | They actually were instrumented but the emma output file was not passed to the report task. After trying to make each library generate its own .em file and passing to the report task, I gave up due to FileSet (and the report task) being stupid. So the main fix is having the libraries contribute to the main coverage.em file (since it's build using the merge option) which location is passed to the library project. The changes to the custom task was to support querying the libraries for a path with a given leaf (from the lib root folder) but this is not used at the moment. The other tasks are slightly cleaned up due to this though and are getting prepared to support customized folder names in folder. Change-Id: Ife59a2971ce6f2acf01b923abe90dea8adee462a
* Fix emma for split projects.Xavier Ducrohet2012-06-146-11/+125
| | | | | | | | | | | | | The location of the .em file was wrong. Changing its location means it gets put in the tested project so we need a way to know where the output of the project is. As we need to be better at supporting customized projects folder, we introduce a new task that will be able to look for the customized path of any projects. So far we only support the output folder and the source folder. Change-Id: Id8db82e254baae2088827c96b7719f94c92c927c
* Fix to improved aidl supportXavier Ducrohet2012-06-072-23/+33
| | | | | | | This is from review comments. I meant to upload this before commit but forgot. Change-Id: Ia2eef22f2a5e6a5120110e69b49491a803636768
* Merge "Manifest Merger: rework interface to collect errors."Raphael Moll2012-06-071-1/+2
|\
| * Manifest Merger: rework interface to collect errors.Raphael Moll2012-06-071-1/+2
| | | | | | | | Change-Id: Ib8add07a611d4d496004567fb23b8c5d38b6e487
* | Projects can now access aidl files from their libraries.Xavier Ducrohet2012-06-053-24/+92
|/ | | | | | | | | | | Library projects now copy their aidl files into bin/aidl. Aidl is now called with this import path for all referenced library projects. Also added a test project. Change-Id: I7f94489e87450be67a16ed7198f85b8b472f5025
* Fix warningsTor Norbye2012-06-011-0/+5
| | | | | | | | | | | | | | | | | First, update our various project-specific Eclipse compiler settings configuration files to include the new Eclipse 4 flags. Second, turn off the "Unchecked conversion from non-annotated type to @NonNull" warnings; there are hundreds or thousands of these, and there isn't much we can do about them when they're coming from platform and library APIs. Third, make the lint projects warning-clean again by addressing various warnings Eclipse found (such as some unclosed resources and some null handling issues; yesterday's null annotation fixes only addressed errors, not warnings.) Change-Id: If75f7401a1cbeef1bf58b47ccaa9ad17bede7f91
* Use aapt output to feed proguard's keep list.Xavier Ducrohet2012-05-291-20/+18
| | | | | | | | | | | This allows us to only keep classes that are really used either through code or through XML. Also tweak the default rules for better control of animated properties. Added a test of a custom property animation and fixed some other misc test files. Change-Id: I7cc5839a764881d8d3c7bfce0a3f12ea7cba660e
* SDK/ant: pass --ignore-assets flag to AAPT.Raphael Moll2012-05-171-0/+11
| | | | | | Requires change Ia4caa2a8 from frameworks/base.git Change-Id: Ifcb469a64146ac2ae65f8516ee9dcfb857a7e2aa
* Fix Ant build.Xavier Ducrohet2012-04-231-1/+1
| | | | Change-Id: I0c7d996f9ea3d27ef2cb8daa671c6284be588d54
* Revert the disable flag of the manifest merger to be enable instead.Xavier Ducrohet2012-04-231-7/+7
| | | | Change-Id: I4f89b469e06f741b95b92d7a4826f979c64dab1b
* Minor fixes in Ant.Xavier Ducrohet2012-04-232-1/+20
| | | | | | | Moved the definition of the custom Ant tasks into a properties file put in the jar files. Change-Id: I33b49c9f8f51ffa4f8a8dcaefccc6e0d874a6a9d
* Manifest merger in Ant build.Xavier Ducrohet2012-04-206-5/+165
| | | | | | | This merges the manifest of the libraries into the application's manifest. Change-Id: I425e7b75f71d3f50c6422cdb62bb5ec6811ce99d
* Properly exclude some classes in code coverage.Xavier Ducrohet2012-04-161-0/+95
| | | | | | | | Using a custom task to create the filter based on the app packages for the main project and its library projects and the list of class to exclude. Change-Id: Id37862bf53656bd17991b5c307d772ed2019650b
* Fix "ant test" + misc clean up / reorganization of build.xmlXavier Ducrohet2012-04-1611-829/+1261
| | | | | | | | | | | | | | | | - 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
* SDK: Fix 2 toLowerCase using default locale.Raphael Moll2012-04-112-2/+4
| | | | Change-Id: I33fbad62b3df21068c64ef434d82682d4d192560
* SDK: anttask refers to old prebuilt location for ant.jarRaphael Moll2012-04-041-1/+1
| | | | Change-Id: I254845a030588b92aa5579258acb24424f19d974
* RS Ant support: split opt level per build type.Xavier Ducrohet2012-03-282-6/+9
| | | | | | | Also make sure the Renderscript files are rebuilt when the build type (debug/release) changes. Change-Id: I688fc3f8550e3133ee32de3ef074efa75ccc3b67
* Use our own signing code in Ant and don't rely on Jarsigner.Xavier Ducrohet2012-03-273-33/+229
| | | | | | | | | | JDK7 changes the default signing algorithm and breaks release builds where the ant script does the signing after building the apk. This changes the Ant script to use a custom task that uses the same code that is already used to sign debug apps. Change-Id: I0df7378a7a59b54ef6a17db363a2127736f4434e
* 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