aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Remove only native caller of CppConfiguration#getTargetGnuSystemName. This isGravatar cpeyser2017-12-18
| | | | | | required to migrate the c++ rules onto platform-based toolchain resolution. PiperOrigin-RevId: 179422935
* Preemptively add deps back for Objective-C compilation after it was removed inGravatar plf2017-12-18
| | | | | | | https://github.com/bazelbuild/bazel/commit/d6ac11dab81ec40e9adc717575904574c6c9dc48. RELNOTES:none PiperOrigin-RevId: 179401717
* 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
* Remove source specific build variables from C++ API.Gravatar plf2017-12-15
| | | | | | | | | | | The only use case was for Objective-C rules so that different set of sources specified in the same rule could be compiled with either ARC or no ARC. To replace source specific build variables, we call into CcLibraryHelper twice for each set of sources. This has led to separating the building of compilation providers and outputs from those related to linking. In the case of Objective-C, the compilation outputs are merged and then passed to a single invocation of linking in CcLibraryHelper. In a later CL, the distinction between compilation and linking will be refined by separating them in different classes. RELNOTES:none PiperOrigin-RevId: 179167102
* 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
* Allow not recognized Artifact category to be handled in Analysis phaseGravatar Googler2017-12-13
| | | | | | | Nonexistent artifact categories or categories that are not supported by the action config now throw InvalidConfigurationException instead of ExpansionException. This allows the checked exception to be caught and reported as a RuleErrorException in Analysis phase. RELNOTES: None. PiperOrigin-RevId: 178919727
* Explain why --include_imports should not be used when creating the ↵Gravatar carmi2017-12-13
| | | | | | | descriptor set output. RELNOTES: None PiperOrigin-RevId: 178904210
* Allow access to some TestAttempt fields for testingGravatar ulfjack2017-12-13
| | | | PiperOrigin-RevId: 178893146
* Add --checkHashMismatch flag to ZipFilterAction.Gravatar jingwen2017-12-12
| | | | | | | | | | This flag is set to true by default. If `--checkHashMismatch IGNORE` is passed, ZipFilterEntryFilter will filter duplicate files based on filenames and not do the check for different content hashes. This is used for Android instrumentation tests: classes already in the target APK are removed from the instrumentation APK to prevent runtime crashes in ART. GITHUB: #903 RELNOTES: Added --checkHashMismatch flag to ZipFilterAction. Valid values are IGNORE, WARN and ERROR. --errorOnHashMismatch is deprecated, please use this flag instead. PiperOrigin-RevId: 178787292
* Automated rollback of commit 367f704e71f352b404df38161f4c367b9ff506c9.Gravatar hlopko2017-12-12
| | | | | | | | | | | | | | *** Reason for rollback *** Rollforward of https://github.com/bazelbuild/bazel/commit/c861c0afd9a4df283936218b9e5b33c452b07c95 after fixing fake link actions. *** Original change description *** Rollback of 178106899. RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's no longer a part of linking command. PiperOrigin-RevId: 178760072
* Update cc_import rule documentationGravatar Yun Peng2017-12-12
| | | | | | | | 1. Allowing .lib as interface library, which is necessary on Windows 2. Documenting cc_improt by giving specific example use cases. Change-Id: Ia50850495a1e91fe913ad69f9119753c32f9b4a7 PiperOrigin-RevId: 178754145
* [java_common.compile] Name output source jar relative to the output jar nameGravatar elenairina2017-12-12
| | | | | | | instead of the rule name. RELNOTES: None. PiperOrigin-RevId: 178747070
* Remove an unused fieldGravatar cushon2017-12-12
| | | | PiperOrigin-RevId: 178731961
* disambiguate mnemonics for $shuffle_jars and $dexsharder actionsGravatar kmb2017-12-11
| | | | | | RELNOTES: None. PiperOrigin-RevId: 178693605
* Removes skyframe/serialization's dependency on cmdline and vfs. Instead, ↵Gravatar Googler2017-12-11
| | | | | | make cmdline and vfs depend on serialization. This allows a class to have a pointer to its codec, which simplifies automatic recursive composite codecs. PiperOrigin-RevId: 178683500
* Move native deps collection code out of android_binary.Gravatar ajmichael2017-12-09
| | | | | | | Also remove a TODO that was addressed in unknown commit. RELNOTES: None PiperOrigin-RevId: 178489151
* Make config_feature_flag's default_value optional.Gravatar mstaib2017-12-08
| | | | | | | | | | | | | | | | | | | | | | | With this change, if the default_value is not set, but the flag has been given a value by a configuration transition, that value is used and no error is produced. If the default_value is not set and the flag has not been given a value by a configuration transition, the rule produces an error (as it did before, but now the error is different). config_feature_flags with default_values behave as they did before. (use the default value if no configured value is set, otherwise use the configured value) Also transition the Optional used in feature flags from Guava to Java 8. RELNOTES: config_feature_flag's default_value is optional. It is only an error to have a config_feature_flag with no default_value if that config_feature_flag has not been set in the configuration it is being evaluated in. PiperOrigin-RevId: 178418907
* Stop filtering resources in analysis in aapt2 buildsGravatar Googler2017-12-08
| | | | | | | | aapt2 always gets the complete, unfiltered resources, and then filters them in execution. Save time by not uselessly filtering in analysis. RELNOTES: none PiperOrigin-RevId: 178397137
* Rollback of 178106899.Gravatar cpeyser2017-12-08
| | | | PiperOrigin-RevId: 178384991
* Infrastructure for fixed checking if android_test can inherit resourcesGravatar Googler2017-12-08
| | | | | RELNOTES: none PiperOrigin-RevId: 178369060
* Move the javabase middleman to within JavaRuntimeInfo.Gravatar lberki2017-12-07
| | | | | | | | | | | This is necessary bacause //tools/jdk:current_host_java_runtime is implemented in Skylark, and we don't (and shouldn't) have a way to create MiddlemanProvider from there. However, we are planning to move to the the java_runtime_alias/java_host_runtime_alias rules as the exclusive representation of the javabase, so we need to be able to make one from Skylark. Previously, this wasn't a problem, because if the javabase was a filegroup (like //tools/defaults:jdk), the path to the Java binary was taken from the configuration and the middleman from the filegroup, but since we are removing that information from the configuration, we can't do that anymore. RELNOTES: None. PiperOrigin-RevId: 178242307
* Implement cc_import ruleGravatar Yun Peng2017-12-07
| | | | | | | | | | Designed here: https://docs.google.com/document/d/1hK2mWl3TYNL9oJYX_S020TKkXZvBw1aBoYERvTHVyfg/edit Fix https://github.com/bazelbuild/bazel/issues/3402 Change-Id: I9beff94d8b85ffeb4e46e0959c8f5ed4ef9c6268 PiperOrigin-RevId: 178238408
* 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
* allow params files for long dexmerger and dexsharder command linesGravatar kmb2017-12-06
| | | | | | RELNOTES: None. PiperOrigin-RevId: 178130422
* Register separate linkstamp compile actionGravatar hlopko2017-12-06
| | | | | | | | | | | | | | | | | This cl replaces entire hardcoded linkstamping command line generation with a separate action. Instead of generating bash command to compile linkstamp and prepending it to the standard link command line, this cl creates a special action that link action depends on. I kept linkstamp action registration in the CppLinkActionBuilder (and GoCompilationHelper internally) to keep the cl shorter and change more localized. I also didn't remove linkstamps and buildInfoHeaderArtifacts from CppLinkAction to stay compatible with extra actions api. Both issues and corresponding cleanups will be addressed in separate cls. RELNOTES: Linkstamping is now a separate and full-blown CppCompileAction, it's no longer a part of linking command. PiperOrigin-RevId: 178106899
* Use static final variables for spawn action resource sets.Gravatar tomlu2017-12-06
| | | | PiperOrigin-RevId: 178100868
* Remove duplicate CppHelper.getCcToolchainType method.Gravatar John Cater2017-12-06
| | | | | Change-Id: I3248af31f9f6f3669177015c9f19ecd49165b191 PiperOrigin-RevId: 178096631
* Move BazelRuleClassProvider.CORE_WORKSPACE_RULES to its own class in the ↵Gravatar lpino2017-12-06
| | | | | | rules/repository package. PiperOrigin-RevId: 178087895
* Depend on //tools/jdk:host_jdk for the host javabase instead of the default JDK.Gravatar lberki2017-12-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 178074510
* Disallow undeclared access to the $(JAVA) and $(JAVABASE) template variables.Gravatar lberki2017-12-06
| | | | | | | | | If a rule needs these template variables, it will need to declare a dependency on them in the future by adding @bazel_tools//tools/jdk:current_java_runtime to its toolchains= attribute. RELNOTES[INC]: In order to access the template variables $(JAVA) and $(JAVABASE), @bazel_tools//tools/jdk:current_java_runtime needs to be added to the toolchains= attribute from now on. RELNOTES: None. PiperOrigin-RevId: 178070807
* Reflect progress on incremental dexing in android_binary's ↵Gravatar kmb2017-12-05
| | | | | | | | incremental_dexing attribute documentation. RELNOTES: None. PiperOrigin-RevId: 178047799
* Fix error prone warning about reference equality.Gravatar ajmichael2017-12-05
| | | | | RELNOTES: None PiperOrigin-RevId: 177965009
* 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
* Add --experimental_java_coverage.Gravatar elenairina2017-12-05
| | | | | | | | | | | | | | | | | | Context: java_import or other custom rules (genrules or Skylark) do not propagate coverage information. Coverage metadata is retrieved from the compilation information and it is passed around through providers as Artifact(s). The problem with the current implementation is that there is no way of retrieving instrumentation metadata from arbitrary jars provided by java_import or other custom rules. --experimental_java_coverage solves the issue presented above ONLY for the java rules (has no effect for android/[]/etc). Implementation details: * For each build jar create a .txt file containing the relative path of each Java file. This file is included in the build jar. It is used for recreating the correct path for each covered file when included in the coverage report. * java_binary/java_test will set 3 environment variables: 1) JACOCO_METADATA_JAR - in experimental mode will be a txt file containing all the jars considered for collecting coverage (JacocoCoverageRunner filters out the ones that don't have .uninstrumented.class files). In non-experimental mode will be a jar containing all the instrumented class files. 2) JACOCO_MAIN_CLASS - The main class to be called for the current coverage run. Previously this information was embedded in the JACOCO_METADATA_JAR's manifest. 3) JACOCO_JAVA_RUNFILES RELNOTES: --experimental_java_coverage is available for testing. PiperOrigin-RevId: 177941471
* Added execution platform to the ActionExecutionMetadata.Gravatar John Cater2017-12-04
| | | | | | | Part of #4128. Change-Id: Id822d3ae6f8daf7c92a75bd8bd28590d4f625845 PiperOrigin-RevId: 177905460
* From apple_binary, receive AppleExecutableBinaryProvider from the ↵Gravatar cparsons2017-12-04
| | | | | | | | | bundle_loader attribute Prior to this change, apple_binary relied on bundle_loader targets (which are themselves apple_binary) to propagate an unwrapped ObjcProvider. That is deprecated, is disabled by --noexperimental_objc_provider_from_linked, and will be killed off shortly. RELNOTES: None. PiperOrigin-RevId: 177862573
* Expose ObjcProtoProvider as a Skylark object.Gravatar cparsons2017-12-04
| | | | | | | | | This does not provide any meaningful API to interact with ObjcProtoProvider from a skylark context -- it simply allows ObjcProtoProvider to be passed between skylark API calls as an opaque object. This helps facilitate exposure of an Apple Linking API to Skylark which will take place in future changes. RELNOTES: None. PiperOrigin-RevId: 177844029
* Remove some deadish Windows-related runfiles code.Gravatar Benjamin Peterson2017-12-04
| | | | | | | | | | | | | | | In particular, SymlinkTreeAction no longer needs to accept artifacts as an input. --experimental_enable_runfiles now immediately reports an error on Windows. This mostly unwinds e4974e4cc6aeb437d36b3b36eb20142b7120fb16 ("Separate runfiles middlemen into two layers") and 41f4456ac2348bef66739194853a1ddadcbb887e ("Make runfiles tree creation on Windows depend on the artifacts of the actual runfiles."). See https://groups.google.com/d/msg/bazel-dev/btOAgxv434g/bDhTOOePAgAJ. Change-Id: Iac3308669bfc07abfd1c91445922269d8fdc2a26 PiperOrigin-RevId: 177837504
* Remove `-R` flags from the MacOS crosstool template.Gravatar John Millikin2017-12-04
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4028 Closes #4029. PiperOrigin-RevId: 177813419
* Fix getBuildFiles to not assume BUILD is the name of the build file.Gravatar John Cater2017-12-04
| | | | | | | Fixes #4056. Change-Id: Ia7425c2146f15e9293605ee3da53007805e82275 PiperOrigin-RevId: 177813070
* Expose some methods from JavaSkylarkApiProvider in JavaInfoGravatar dbabkin2017-12-04
| | | | | | | | | | | | | JavaSkylarkApiProvider will be deprecated soon and replaced by JavaInfo. Methods exposed: NestedSet<Artifact> getTransitiveSourceJars() NestedSet<Artifact> getTransitiveRuntimeDeps() NestedSet<Artifact> getTransitiveDeps() Also created helped method to eliminate all duplication code and refactored some methods with is. RELNOTES:none PiperOrigin-RevId: 177804645
* Switch GenRuleBase to use the new Expander APIGravatar ulfjack2017-12-04
| | | | | | | | | | | | | | | | | This is a roll-forward of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, which broke some genrules, but without some cleanup changes which I'm submitting separately, and with a fix for the bug. The problem was that I switched from withExecLocations(labels) to withExecLocations(); the original code was in CommandHelper, and the new code in GenRuleBase, so this was not obvious. Also, we didn't have test coverage for this case - note that the specified labels are _added_ to the default map of labels, rather than replacing the default map of labels. This only matters if the dependent rule provides a GenRuleSourcesProvider, which only a single (Google-internal) rule does. PiperOrigin-RevId: 177802902
* Remove the java_executable field from ctx.fragments.jvm .Gravatar lberki2017-12-04
| | | | | | | | | | The same information is accessible as JavaRuntimeInfo.java_executable_exec_path. In order to access that, add an implicit attribute that depends on @bazel_tools//tools/jdk:current_java_runtime, then do ctx.attr._java_runtime[java_common.JavaRuntimeInfo].java_executable_exec_path . RELNOTES[INC]: The path to the JVM executable is not accessible anymore as ctx.{fragments,host_fragments}.jvm.java_executable. Use JavaRuntimeInfo.java_executable_exec_path instead. PiperOrigin-RevId: 177786910
* Fix missing print statements in output functionsGravatar vladmos2017-12-02
| | | | PiperOrigin-RevId: 177708823
* Forward test relevant flags to mobile-install launcher.Gravatar Googler2017-12-01
| | | | | | | | Add new flag to specify the adb device serial number (--device). Change ..._mi/launcher.sh to ..._mi/launcher (see unknown commit). RELNOTES: None PiperOrigin-RevId: 177662635
* Remove duplicated method from AndroidBinary.Gravatar ajmichael2017-12-01
| | | | | RELNOTES: None PiperOrigin-RevId: 177638999
* 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
* Make AndroidSdkProvider.verifyPresence throw.Gravatar ajmichael2017-12-01
| | | | | | | All call sites were just returning null if it failed anyways. RELNOTES: None PiperOrigin-RevId: 177632366