aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
Commit message (Collapse)AuthorAge
* Expose Library Aar creation and provider to SkylarkGravatar asteinb2018-05-07
| | | | | RELNOTES: none PiperOrigin-RevId: 195719735
* Automated rollback of commit f384ab5855ba230e7767b7b5350bd72ef01b9a1b.Gravatar asteinb2018-05-07
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Memory regression (b/79331026) *** Original change description *** Some fixup for R.class files Expose R.class file in AndroidResourcesInfo, to allow Java compilation. Include documentation that the R.class should not be used in other targets. Actually generate the R.class file in the case of an android_library with no manifest, resources, or assets, rather than compiling it from the R.java RELNOTES: none PiperOrigin-RevId: 195659672
* Some fixup for R.class filesGravatar asteinb2018-05-04
| | | | | | | | | | | | Expose R.class file in AndroidResourcesInfo, to allow Java compilation. Include documentation that the R.class should not be used in other targets. Actually generate the R.class file in the case of an android_library with no manifest, resources, or assets, rather than compiling it from the R.java RELNOTES: none PiperOrigin-RevId: 195419781
* Add support for reporting an error if android_test.binary_under_test ↵Gravatar cushon2018-04-30
| | | | | | | contains incompatible versions of deps RELNOTES: Add support for reporting an error if android_test.binary_under_test contains incompatible versions of deps PiperOrigin-RevId: 194857840
* 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
* Remove no-op check from AndroidCommon, add missing rule validation to aar_importGravatar kmb2018-04-24
| | | | PiperOrigin-RevId: 194191933
* Remove JavaConstraintsProvider, allow specifying constraints when ↵Gravatar kmb2018-04-24
| | | | | | constructing JavaInfo providers instead PiperOrigin-RevId: 194123199
* Add getters to JavaCompilationArgsProviderGravatar cushon2018-04-24
| | | | | | | | | | for direct, transitive, and full compile-time jars; runtime jars; and instrumentation metadata. These are trivial wrappers around the corresponding getters on the recursive and non-recursive JavaCompilationArgs objects. This is a no-op refactoring in preparation for flatting JavaCompilationArgs into JavaCompilationArgsProvider. PiperOrigin-RevId: 194047064
* aar_import doesn't export AndroidSkylarkApiProviderGravatar asteinb2018-04-20
| | | | | | | | aar_import probably should give IDEs the same information as other rules, but it doesn't at the moment. Stop exporting the corresponding provider. RELNOTES: none PiperOrigin-RevId: 193701950
* Clean up R class generationGravatar asteinb2018-04-18
| | | | | | | | | | | Remove R class generation from AndroidCommon and instead invoke it just after resource processing. This is much more intuitive, behaves the same, and will make it easier to call into R class generation on the new pipeline. Also, clean up some dead code (including newly-dead code) from AndroidCommon. RELNOTES: none PiperOrigin-RevId: 193345190
* Add decoupled asset containers to ResourceApk wrapper objectGravatar asteinb2018-04-17
| | | | | | | | | | | The ResourceApk object contains all the processed Android data. When assets are decoupled, pass them in seperately. I'll replace ResourceContainer with the ValidatedAndroidData interface as part of the next review. RELNOTES: none PiperOrigin-RevId: 193223251
* Provider and dependency container for Android assetsGravatar asteinb2018-04-16
| | | | | | | | | | | | These classes will allow a reasonable asset-only merging action in the next change. The relationship between AndroidAssetsInfo and AssetDependencies is a bit messy; I based it on the existing resource provider and dependencies class rather than come up with something radically different. RELNOTES: none PiperOrigin-RevId: 193085304
* Remove vestiges of support for 'reduced runtime classpaths'Gravatar cushon2018-04-14
| | | | PiperOrigin-RevId: 192914109
* Automated rollback of commit 7edc5d49c8e764ab2bdf19e3a9fb58ea30fa708f.Gravatar dbabkin2018-04-13
| | | | | | | | | | | | *** Reason for rollback *** b/77997997 *** Original change description *** Remove the Blaze strict java deps exemption for Android databinding. Use the JavaBuilder processor exemption list instead of disabling strict deps for the affected rules outright. This narrows the degree to which the exemption is applied, and prevents other strict deps violations from accruing on targets that enable databinding. PiperOrigin-RevId: 192755946
* Remove JavaRuntimeJarProvider.Gravatar elenairina2018-04-13
| | | | PiperOrigin-RevId: 192736049
* Remove the Blaze strict java deps exemption for Android databinding. Use the ↵Gravatar Googler2018-04-09
| | | | | | JavaBuilder processor exemption list instead of disabling strict deps for the affected rules outright. This narrows the degree to which the exemption is applied, and prevents other strict deps violations from accruing on targets that enable databinding. PiperOrigin-RevId: 192176621
* Rename LocalResourceContainer to AndroidResources and remove asset code from itGravatar asteinb2018-03-29
| | | | | | | | | | | | | As part of decoupling Android resources and assets, rename LocalResourceContainer to AndroidResources and remove asset code from it. Some general asset and manfiest code still remains and will be dealt with in future changes. Remove LocalResourceContainer from the ParsingActionBuilder, since it's always used to build the ResourceContainer that is subsequently passed in. RELNOTES: none PiperOrigin-RevId: 190945260
* Split AndroidAssets class out of LocalResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | AndroidAssets will be the new home for asset-related code (including, in the future, from ResourceContainer). This is the first step towards decoupling Android asset and resource processing. LocalResourceContainer will be replaced with resource-specific code in the next change. RELNOTES: none PiperOrigin-RevId: 190936954
* Remove top level resources and assets from android_local_test.Gravatar dannark2018-02-22
| | | | | | | android_local_test should not allow specifying resources and assets on the rule itself. If a user wants to add test specific resources/assets then they should wrap them in an android_library and add it to the deps of the android_local_test. RELNOTES: None PiperOrigin-RevId: 186724709
* Rename NativeLibsZipsInfo to AndroidNativeLibsInfo.Gravatar Googler2018-02-16
| | | | | | | | | Expose AndroidNativeLibsInfo constructor to Skylark. Marked as undocumented, since this provider will we replaced with a provider implemented in Skylark once all rules are migrated. RELNOTES: None PiperOrigin-RevId: 186072410
* Expose aar native libs to skylark.Gravatar Googler2018-02-15
| | | | PiperOrigin-RevId: 185927949
* Make blaze stop passing --rule_kind to java tools.Gravatar tomlu2018-02-09
| | | | | | | This argument is unused and should be removed. RELNOTES: None PiperOrigin-RevId: 185147327
* Automated rollback of commit e01d0c8f9019b7e0beb406ea3932e7dc84b6f333.Gravatar Googler2018-02-07
| | | | | | | | | | | | | *** Reason for rollback *** Has no effect, since one version violation does not use _deploy.jar/_filtered.jar. *** Original change description *** Filter out generated proto extension registry loader from instrumentation APK. RELNOTES: None PiperOrigin-RevId: 184918011
* Don't generate the blaze generated extension registry for Android tests that ↵Gravatar Googler2018-02-06
| | | | | | | | | | define a binary_under_test. They are filtered out for deployment anyways so it's unnecessary work and it confuses the one version detector. RELNOTES: n/a PiperOrigin-RevId: 184725205
* Return JavaPluginInfoProvider via JavaInfo in android_library.Gravatar elenairina2018-02-06
| | | | PiperOrigin-RevId: 184689620
* PiperOrigin-RevId: 184203570Gravatar Googler2018-02-01
|
* Expose ApkInfo and AndroidInstrumentationInfo to Skylark.Gravatar ajmichael2018-01-29
| | | | | | | This will enable us to write testing rules in Skylark. RELNOTES: None PiperOrigin-RevId: 183719720
* Fix usages of PathFragment segments that will become inefficient.Gravatar tomlu2018-01-19
| | | | | | | An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
* Filter out generated proto extension registry loader from instrumentation APK.Gravatar Googler2018-01-16
| | | | | RELNOTES: None PiperOrigin-RevId: 182145172
* Add support for native header outputs to {java,android}_libraryGravatar cushon2018-01-11
| | | | PiperOrigin-RevId: 181684446
* Remove unused code from AndroidIdeInfoProvider.Gravatar tomlu2018-01-11
| | | | PiperOrigin-RevId: 181657963
* Remove more dead codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179933248
* Remove dead android_resources codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179928735
* 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
* Remove JavaNeverlinkInfoProvider.Gravatar elenairina2017-12-18
| | | | | | | | We need to handle neverlink libraries in java_common (see #3735). Therefore JavaInfo needs to store the neverlink information. Instead of wrapping yet another provider (JavaNeverlinkInfoProvider) into JavaInfo, store the neverlink value directly. PiperOrigin-RevId: 179439005
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Filter out generated databinding files from instrumentation APK.Gravatar ajmichael2017-12-15
| | | | | | | Note that this implies that databinding cannot be used on resources in the test apk. However, the resources in the test apk are already very weird - so I don't think this makes them much weirder. RELNOTES: None PiperOrigin-RevId: 179243983
* Rename OutputGroupProvider -> OutputGroupInfo.Gravatar dslomov2017-12-14
| | | | | RELNOTES: None PiperOrigin-RevId: 179046403
* Perform ZipFilterAction on the instrumentation JAR using the target JAR as ↵Gravatar jingwen2017-12-13
| | | | | | | | | | filter. .class and R.class files are filtered out. During an instrumentation test, jars from both APKS will be loaded onto the same classloader by ART. To prevent runtime crashes due to duplicate classes, we strip the dupe class out from the instrumentation jar. GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 178983712
* Expose two methods from JavaSkylarkApiProvider in JavaInfoGravatar dbabkin2017-12-07
| | | | | | | | | | | | JavaSkylarkApiProvider will be deprecated soon and replaced by JavaInfo. Methods exposed: getCompilationInfoProvider() getTransitiveExports() Changed signature of JavaCommon methods to accept JavaInfoBuilder. RELNOTES:none PiperOrigin-RevId: 178229835
* Use static final variables for spawn action resource sets.Gravatar tomlu2017-12-06
| | | | PiperOrigin-RevId: 178100868
* Expose getGenJarsProvider methods from JavaSkylarkApiProvider in JavaInfoGravatar dbabkin2017-12-05
| | | | | | | | | | | JavaSkylarkApiProvider will be deprecated soon and replaced by JavaInfo. Methods exposed: getGenJarsProvider() Made changed in all relevant Java family rules, to build JavaGenJarsProvider provider and assign to JavaInfo RELNOTES:none PiperOrigin-RevId: 177950965
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Fix changes that broke resource filtering, and document related confusionGravatar Googler2017-10-23
| | | | | | | | | | | | | | | | | | | | | | | | Recent changes: 1) Started passing all resources to processors, ignoring the filtered ResourceContainers, and 2) Started loading an unfiltered LocalResourceContainer into binary resource processing, in addition to the filtered container. Fix both of these. To fix the former, we need to split the misleadingly-named 'transitiveResourceRoots' (actually transitive resource and assets artifacts) into transitive resources and assets. Update resource filtering tests to catch bugs like these. Also, rename getters for resource containers to make clear that they are not getters for resources. Finally, document some weirdness and partially-completed migrations encountered as part of investigating these issues, and add appropriate TODOs and deprecation. RELNOTES: None PiperOrigin-RevId: 172929936
* Return JavaInfo providers only once in Java rules.Gravatar elenairina2017-10-11
| | | | | | | Previously the java rules returned some providers twice: once as regular providers and once wrapped in JavaInfo (e.g. JavaCompilationArgsProvider). This is unnecessary, inefficient and error prone. JavaInfo should be the only way of returning these providers. RELNOTES: None. PiperOrigin-RevId: 171663550
* 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
* Remove dead code.Gravatar ajmichael2017-10-06
| | | | | RELNOTES: None PiperOrigin-RevId: 170899433
* Automated rollback of commit 411039319c1c67f2b9c8a7ada9e0a11d9bd4023f.Gravatar elenairina2017-09-28
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks coverage for android_test (N/A). Can be reproduced with unknown commit. *** Original change description *** Rollforward change of Java coverage logic. RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170322801
* Rollforward change of Java coverage logic.Gravatar elenairina2017-09-26
| | | | | | | | | | RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170038845