aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidSemantics.java
Commit message (Collapse)AuthorAge
* Remove ApplicationManifestGravatar asteinb2018-08-08
| | | | | | | | | | | | This class just contains methods used elsewhere; move them to appropriate places (generally AndroidManifest or StampedAndroidManifest). Also, somewhat reduce code duplication by having more stuff use the existing AndroidManifest.from() method, which automatically handles unspecified manifests and packages. RELNOTES: none PiperOrigin-RevId: 207913410
* Remove non-static ApplicationManifest methodsGravatar asteinb2018-08-08
| | | | | | | | | | | | | | | | Remove all state from the ApplicationManifest class. Actual methods in this class will be migrated to somewhere more appropriate in upcoming changes. We now usually use the manifest passed around in the ResourceApk object instead. (The exception is mobile-install, which still wants to use the raw manifest.) Note that this manifest is the processed manifest output by resource processing - using it will somewhat decrease parallelisim, but is also more correct. (We'll get the parallelisim gains back once we now longer use the legacy manifest merger and don't need to process the manifest in resource processing.) RELNOTES: none PiperOrigin-RevId: 207881830
* Move non-resource busybox actions to BusyBoxActionBuilder and AndroidDataContextGravatar asteinb2018-05-22
| | | | | | | | | | | | | BusyBoxActionBuilder makes much cleaner action builders while making it harder to do Bad Things (like collapsing NestedSets in analysis, or adding an artifact to one of the command line and the inputs but not both). Remaining action builders will be moved in the next change. Add old manifest merger tool to AndroidDataContext. RELNOTES: none PiperOrigin-RevId: 197607155
* Pass AndroidDataContext to remaining non-ActionBuilder codeGravatar asteinb2018-05-22
| | | | | | | | | | | | Now that the AndroidDataContext is passed everywhere, we can begin modifying action builders. This includes removing Label information from Proguard artifact paths. getUniqueDirectoryArtifact() already included label earlier in the path, so this information was redundant anyway. RELNOTES: none PiperOrigin-RevId: 197576210
* Pass AndroidDataContext through manifest processing methodsGravatar asteinb2018-05-22
| | | | | | | | | | | | | | | Manifest processing methods are particularly messy for this migration, since the old ApplicationManifest class is still around. Anyway, pass around AndroidDataContext instead of RuleContext everywhere we can. Note that the built-in expander does not seem able to be modified to support decoupling attributes and other information, and thus really can't be done once we get rid of RuleContext. Instead, for Skylark rules, document that expansion must happen outside of the Android data Skylark method calls (for example, for manifest_values and nocompress_extensions). RELNOTES: none PiperOrigin-RevId: 197567541
* Create AndroidDataContext to wrap context needed when working with Android dataGravatar asteinb2018-05-22
| | | | | | | | | | | | | | | | | | | This new object wraps Label, ActionConstructionContext, and various data-related tools (currently, just the resource Busybox and the Android SDK). All three of these things are required for creating pretty much any action for working with Android assets, resources, and manifests, so it makes sense to pass them around together. Eventually, we'll use this class instead of RuleContext in any code called from the Skylark APIs. For now, though, just have it wrap a RuleContext - the migration away from that will happen in future changes. Change the current Skylark API to take this class, rather than a SkylarkRuleContext. This is the first step towards not passing RuleContext (or SkylarkRuleContext) into the Skylark API. RELNOTES: none PiperOrigin-RevId: 197549155
* Properly rename manifestsGravatar asteinb2018-05-09
| | | | | | | | | | | | | Make AndroidSkylarkData abstract and add a getAndroidSemantics() method The Skylark stamp_manifest rule should properly use AndroidSemantics to rename the manifest as well, in keeping with the android_library rule. AndroidLocalTest should do the same manifest renaming regardless of which AndroidSemantics it is run under. Have it use a seperate method to do so. RELNOTES: none PiperOrigin-RevId: 195992300
* Make java_common.compile's javacopt handling consistent with native Java rulesGravatar cushon2018-04-25
| | | | | | | | | | | Compilations performed by java_common.compile now use the javacopts in the java_toolchain by default, instead of requiring them to be explicitly retrived using java_common.default_javac_opts, for consistency with the native rules. java_common.compile(javac_opts=...) can still be used to pass additional javacopts. RELNOTES: Make java_common.compile now uses java_toolchain javacopts by default; explicitly retrieving them using java_common.default_javac_opts is unnecessary. PiperOrigin-RevId: 194254098
* Allow android_library rule to also accept rules that provide the JavaInfoGravatar Googler2018-03-20
| | | | | | | provider as an input. RELNOTES: PiperOrigin-RevId: 189868401
* Add labels to some Android progress messages.Gravatar ajmichael2018-02-12
| | | | | RELNOTES: None PiperOrigin-RevId: 185412809
* Remove android_resources and "resources" attributeGravatar Googler2017-12-21
| | | | | RELNOTES: none PiperOrigin-RevId: 179844898
* Remove references to some internal tooling.Gravatar ajmichael2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179722149
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Move IDL constant out of AndroidSemanticsGravatar ajmichael2017-12-01
| | | | | | | | | AndroidSemantics is for "pluggability". Defining static constants on the interface does not do that. Furthermore, output group names are not something we would want to change between internal and external. RELNOTES: None PiperOrigin-RevId: 177632488
* Move getManifestForRule implementation into default method.Gravatar dannark2017-11-03
| | | | | RELNOTES: None PiperOrigin-RevId: 174355404
* Add debug_key attribute to android_binary.Gravatar ajmichael2017-10-06
| | | | | | RELNOTES: android_binary now supports custom debug keys via the debug_key attribute. PiperOrigin-RevId: 171081759
* Adds getProguardSpecsForManifest to AndroidSematics to inject proguard specs.Gravatar Googler2017-09-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 168300744
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166249211
* Remove JavaIdeInfoProvider.Gravatar dslomov2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161086496
* Automated rollback of commit 480d6038905b3c8de09a362e2759fc6b8abe634c.Gravatar twerth2017-07-05
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks tests in current Blaze nightlies, see b/63296317 *** Original change description *** Add minSdkVersion optimization to Blaze. This optimization reduces the size of Android apps that use Proguard by ~0.2 - 0.3% depending on the minSdkVersion. RELNOTES: None. PiperOrigin-RevId: 160930942
* Add minSdkVersion optimization to Blaze.Gravatar Googler2017-07-03
| | | | | | | This optimization reduces the size of Android apps that use Proguard by ~0.2 - 0.3% depending on the minSdkVersion. RELNOTES: None. PiperOrigin-RevId: 160673030
* Modify AndroidSemantics#addMainDexListActionArguments to take proguard map ↵Gravatar Googler2017-03-31
| | | | | | | | | | as argument. This is needed because which proguard map that gets added as an argument to mainDexListAction depends on whether or not Rex is enabled RELNOTES: None PiperOrigin-RevId: 151720305
* Description redacted.Gravatar Adam Michael2017-03-28
| | | | | | -- PiperOrigin-RevId: 151407958 MOS_MIGRATED_REVID=151407958
* Delete some dead android rules and tools code.Gravatar Adam Michael2017-01-09
| | | | | | -- PiperOrigin-RevId: 143823562 MOS_MIGRATED_REVID=143823562
* Read android binary attributes that are queried for incremental dexing ↵Gravatar Googler2016-09-28
| | | | | | | artifacts from AndroidSemantics. -- MOS_MIGRATED_REVID=134475699
* Move Android and Java 7 javacopts into java_toolchainGravatar Liam Miller-Cushon2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125360308
* Add addMainDexListActionArguments to AndroidSemantics.Gravatar Googler2016-06-13
| | | | | -- MOS_MIGRATED_REVID=124602618
* Allow use of Exceptions to exit early out of configured-target creation, ↵Gravatar Chris Parsons2016-05-24
| | | | | | | | | | instead of passing and checking null in all helpers. Demonstrates this pattern usage in a few select rules (e.g. AndroidBinary) where this was particularly egregious. There are many places which can benefit from this pattern -- this change doesn't try to fix them all at once. -- MOS_MIGRATED_REVID=123012378
* Simplifies passing the debug key to ApkBuilder.Gravatar Alex Humesky2016-01-12
| | | | | -- MOS_MIGRATED_REVID=111892954
* Add Android IDL jar outputs.Gravatar Googler2015-09-28
| | | | | | | | | | These outputs are a jar and source jar for the results of aidl processing. This is used to add aidl output to IDEs separate from the source code, similar to annotation output (gen jars). -- MOS_MIGRATED_REVID=104024453
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Implement support for android_library and android_binary in ↵Gravatar Dmitry Lomov2015-09-22
| | | | | | | AndroidStudioInfoAspect. -- MOS_MIGRATED_REVID=103635637
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766
* Remove the debug_key attribute from android_binary and the associated -ks ↵Gravatar Lukacs Berki2015-06-16
| | | | | | | argument from the ApkBuilder invocation, because it turns out that ApkBuilder doesn't support it. -- MOS_MIGRATED_REVID=96035676
* Move the source code of the Android rules to the Bazel tree.Gravatar Lukacs Berki2015-05-19
This is mostly a "[] mv", except for the extra constant that specifies the location of the Android SDK and moving the $zip attribute. They are minor enough to be included in this CL. Tested by creating a Bazel tree, compiling it and verifying that the Android classes are in libblaze.jar. I also eyeballed the source as a final check that nothing sensitive gets leaked. -- MOS_MIGRATED_REVID=93971892