aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java
Commit message (Collapse)AuthorAge
* Add exports attribute to proto_library.Gravatar twerth2018-08-14
| | | | | | | Note that it is currently only used by the java_proto_library family of rules (if enabled per flag). RELNOTES: None PiperOrigin-RevId: 208601730
* Expose the JavaConfiguration get fields to Skylark for the android_sdk rule.Gravatar Googler2018-07-25
| | | | | RELNOTES: none. PiperOrigin-RevId: 206035881
* Add option to turn on strict deps for the java compilation of proto generatedGravatar twerth2018-07-13
| | | | | | | Java code. RELNOTES: None PiperOrigin-RevId: 204471346
* Automated refactor of Label.parseAbsolute() to always pass a repository mappingGravatar dannark2018-06-27
| | | | | RELNOTES: None PiperOrigin-RevId: 202360925
* Remove the $(JAVA_TRANSLATIONS) Make variable.Gravatar lberki2018-06-19
| | | | | | RELNOTES[INC]: The $(JAVA_TRANSLATIONS) Make variable is not supported anymore. PiperOrigin-RevId: 201278971
* Remove STRICT_ERROR from ImportDepsCheckingLevel, as it is replaced with ERROR.Gravatar cnsun2018-06-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 199382344
* Migrate remaining java skylark types to skylarkbuildapiGravatar cparsons2018-06-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 198911668
* Add a new "STRICT_ERROR" for the flag "--experimental_import_deps_checking" ↵Gravatar cnsun2018-04-23
| | | | | | | | | to check the direct dependencies for aar_import targets. Currently the default value of this flag is not changed. And it will be enabled in a separate cl. RELNOTES: None PiperOrigin-RevId: 193959866
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-20
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193
* Remove WorkerTestStrategy and with it, ↵Gravatar lberki2018-04-12
| | | | | | | | | BuildConfiguration.Fragment#compatibleWithStrategy(). The experiment did not work out. RELNOTES: None. PiperOrigin-RevId: 192567832
* Add the flag --experimental_import_deps_checking to control the dependencyGravatar cnsun2018-03-08
| | | | | | | checking for aar_import and java_import targets. RELNOTES:None. PiperOrigin-RevId: 188399775
* Add --experimental_fix_deps_tool flag to BazelGravatar Googler2018-03-05
| | | | | RELNOTES: None PiperOrigin-RevId: 187936071
* Deletes CODEC fields now that they are no longer needed.Gravatar shahan2018-02-28
| | | | PiperOrigin-RevId: 187397314
* Allows @AutoCodec to use factory methods.Gravatar shahan2018-01-29
| | | | | | Generalizes @AutoCodec.Constructor to @AutoCodec.Instantiator. PiperOrigin-RevId: 183702768
* Minor cleanup: move all code from JavaConfigurationLoader to the ctor of ↵Gravatar lberki2018-01-11
| | | | | | | JavaConfiguration. RELNOTES: None. PiperOrigin-RevId: 181593727
* Fold the Jvm configuration fragment into JavaConfiguration.Gravatar lberki2018-01-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 181579365
* Codecs for all non-test Fragment subclasses (except CppConfiguration, ↵Gravatar shahan2018-01-05
| | | | | | handled separately). PiperOrigin-RevId: 180974083
* Remove an unused JavaClasspathModeGravatar cushon2017-11-07
| | | | PiperOrigin-RevId: 174818556
* Add an additional flag (--one_version_enforcement_on_java_tests)Gravatar Googler2017-10-27
| | | | | | | | to blaze to allow us to toggle off enforcement of the one version property while building java tests. RELNOTES: n/a PiperOrigin-RevId: 173578269
* Move --experimental_allow_runtime_deps_on_neverlink to JavaOptions.Gravatar mstaib2017-10-06
| | | | | | | This migration flag only affects Java rules. RELNOTES: None. PiperOrigin-RevId: 171026607
* Move --plugin to JavaOptions and remove --plugin_copt.Gravatar mstaib2017-09-26
| | | | | | | | | | | | | | | --plugin, though once used for C++, is currently a Java-specific flag. --plugin_copt is currently a total no-op, and has been for a long time. Moving these to the Java fragment is a little neater and helps get one step closer to enforcing LateBoundDefault fragment access. Additionally, since the "no plugins with duplicate names" restriction was added to work with plugin_copt, this restriction can be lifted. It no longer adds any value. RELNOTES: None. PiperOrigin-RevId: 169981221
* Turn off C++ provider propagation from java_proto_library, until ↵Gravatar carmi2017-08-07
| | | | | | | J2ObjcAspect ignores them. RELNOTES: None PiperOrigin-RevId: 164335492
* Exposing the value of strict_java_deps flag to Skylark.Gravatar elenairina2017-07-05
| | | | | | | | | | Fixes #3295. Users requested this [1] and it is useful for example to pass it as a value to java_common.compile#strict_deps. [1] https://stackoverflow.com/questions/44827704/bazel-can-a-skylark-action-read-a-command-line-flag-strict-java-deps PiperOrigin-RevId: 160886151
* Roll back ↵Gravatar cushon2017-06-20
| | | | | | | | | | | | https://github.com/bazelbuild/bazel/commit/4929ad79865f8c13ef3b33c827040f4a037e4afe And use params files for turbine actions with transitive classpaths For actions where direct deps cannot be used, turbine spawns should always use params files. The transitive classpath may exceed the command line length limit. PiperOrigin-RevId: 159473987
* Automated g4 rollback of commit 923d7df521f67d031b288180560848bd35e20976.Gravatar brandjon2017-06-19
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks dozens of targets in the nightly with Tool Failure errors *** Original change description *** Clean up turbine action creation Support disabling javac fallback for actions without a direct classpath, and only use the 'JavacTurbine' mnemonic for spawns that require javac-turbine due to annotation processing to make it easier to collect metrics on that. Finally, remove --java_header_compilation_direct_classpath now that it has been productionized and enabled by default. PiperOrigin-RevId: 159260596
* Clean up turbine action creationGravatar cushon2017-06-08
| | | | | | | | | | | | Support disabling javac fallback for actions without a direct classpath, and only use the 'JavacTurbine' mnemonic for spawns that require javac-turbine due to annotation processing to make it easier to collect metrics on that. Finally, remove --java_header_compilation_direct_classpath now that it has been productionized and enabled by default. PiperOrigin-RevId: 158359858
* Add experimental support for disabling turbine fallback to javac-turbineGravatar cushon2017-05-05
| | | | PiperOrigin-RevId: 155223937
* Add the option for warning-level enforcement of One Version violations. This ↵Gravatar Googler2017-05-04
| | | | | | updates --experimental_one_version_enforcement from a boolean flag to a 3-state enum (OFF, WARNING, ERROR). PiperOrigin-RevId: 154978203
* Automated g4 rollback of commit f2f7839eefe1274bf9e25708201ec3cd89b19846.Gravatar cushon2017-05-03
| | | | | | | | | | *** Reason for rollback *** The experiment did not succeed. It is valid for the fallback to succeed if the original failure was due to a Strict Java Deps error, so enabling this feature as it is currently implemented is not possible. PiperOrigin-RevId: 154948042
* Change the tag experimental_testrunner into a couple of flags.Gravatar kush2017-03-31
| | | | | | | | | | | | | | | Note 1) Explanation of the flags: --explicit_java_test_deps: This is a flag independent of the others, and forces users to specify the JUnit deps. We should try to make this flag default to true in a future release, irrespective of the work around persistent java tests. --experimental_testrunner: Bazel-only flag affecting switching from the BazelTestRunner to the ExperimentalTestRunner which will run the tests in a separate classloader. --explicit_java_test_deps is desired for this to ensure once we split the classpaths of the TestRunner and the TestTarget, the TestTarget does not hit a ClassNotFoundException, due to missing JUnit deps. --test_strategy=experimental_worker: This is the existing flag, which in turn depends on --experimental_testrunner flag, since only the ExperimentalTestRunner is capable to running java tests persistently. Note 2) There was no clean way to check for the flags defined in JavaOptions within TestActionBuilder (as I was checking the "tag=experimental_testrunner" before), without making TeasActionBuilder's build rules depend on java rules (yikes!). Hence, I created a new method compatibleWithStrategy() within each fragment, so I could check if WorkerTestStrategy could be compatible with the user specified flags. Thanks to Greg for suggesting this approach! RELNOTES: None PiperOrigin-RevId: 151729869
* introduce hidden flag to configure bytecode optimizersGravatar Kevin Bierhoff2017-03-27
| | | | | | -- PiperOrigin-RevId: 151170448 MOS_MIGRATED_REVID=151170448
* Remove experimental Java min classpath optimizationGravatar Liam Miller-Cushon2017-03-12
| | | | | | -- PiperOrigin-RevId: 149789440 MOS_MIGRATED_REVID=149789440
* Remove unused javacOpts field and its getter from JavaConfiguration.Gravatar Philipp Wollermann2017-03-06
| | | | | | | | | They were only used by a test that can just as well use the tokenized version of the javacOpts. -- PiperOrigin-RevId: 149102073 MOS_MIGRATED_REVID=149102073
* Rollback of commit bd3be73b84001dbdb2f05297f215e8eb5bacf0e1.Gravatar Damien Martin-Guillerez2017-02-22
| | | | | | | | | | | | | | | | *** Reason for rollback *** To deprecate that flag, we need to fix #2539 first. *** Original change description *** Deprecate the legacy_java_test flag, now that nolegacy_java_test has been the default for quite a while now. RELNOTES[INC]: legacy_java_test flag will not have any effect now. -- PiperOrigin-RevId: 148107667 MOS_MIGRATED_REVID=148107667
* Deprecate the legacy_java_test flag, now that nolegacy_java_test has been ↵Gravatar Kush Chakraborty2017-02-20
| | | | | | | | | | the default for quite a while now. RELNOTES[INC]: legacy_java_test flag will not have any effect now. -- PiperOrigin-RevId: 147851661 MOS_MIGRATED_REVID=147851661
* Install support for checking for 'one version' correctness of java_binaryGravatar Googler2017-02-10
| | | | | | | | | | | | | | | | rules: If the collection of jars for a java_binary contain more than one instance of the same class, one of them will be arbitrarily loaded at runtime. This is problematic if the instances of the class are not identical, as methods or fields from one class version might be missing in the other, leading to runtime failures when methods are missing. This change adds an experimental flag to enable one version enforcement. The actual enforcement tool will come later. -- PiperOrigin-RevId: 147166361 MOS_MIGRATED_REVID=147166361
* Add a flag to make fallback from direct to transitive classpaths an errorGravatar Liam Miller-Cushon2017-02-01
| | | | | | -- PiperOrigin-RevId: 146143641 MOS_MIGRATED_REVID=146143641
* Remove --javawarnGravatar Liam Miller-Cushon2017-01-17
| | | | | | | | | | Resolves #2363 RELNOTES: Remove support for --javawarn; use e.g. --javacopt=-Xlint:all instead -- PiperOrigin-RevId: 144652008 MOS_MIGRATED_REVID=144652008
* Add an experimental option to reduce header compilation classpathsGravatar Liam Miller-Cushon2017-01-04
| | | | | | | | to only contain direct dependencies. -- PiperOrigin-RevId: 143557048 MOS_MIGRATED_REVID=143557048
* Manually add periods to documentation strings where needed.Gravatar John Cater2017-01-03
| | | | | | | | -- Change-Id: I9ec3209a69ba5a51943b334f278ba93d67d4f9f4 Reviewed-on: https://cr.bazel.build/8090 PiperOrigin-RevId: 143470915 MOS_MIGRATED_REVID=143470915
* Make an enum final, the way it should be.Gravatar Lukacs Berki2017-01-03
| | | | | | -- PiperOrigin-RevId: 143434756 MOS_MIGRATED_REVID=143434756
* Prepare to remove ↵Gravatar Liam Miller-Cushon2016-10-24
| | | | | | | --experimental_optimize_header_compilation_annotation_processing -- MOS_MIGRATED_REVID=137035372
* Remove the JAVA_CPU make variable.Gravatar Ulf Adams2016-09-08
| | | | | | | Use TARGET_CPU instead; they always have the exact same value. -- MOS_MIGRATED_REVID=132547819
* Optional reuse of classpath from previous compile saved in memory, as itGravatar Googler2016-08-24
| | | | | | | | | | | | | appears in the jdeps file. These are the minimum inputs needed by the JavaCompileAction to obtain the correct result when classpath order and source files remain unchanged. Uses existing --java_classpath flag to toggle between 'javabuilder' (current released behavior) and new 'experimental_blaze' (minimum classpath and Spawn inputs). Handles failure of minimal action by falling back to existing compilation behavior when needed. The new Spawn does not use a parameter file, but puts all arguments directly on the command line. -- MOS_MIGRATED_REVID=131109163
* java_proto_library strict deps: add attributes for gradual migrationGravatar Carmi Grushko2016-07-27
| | | | | | | | | Control strict-deps through a rule-level and a package-level attribute, allowing finer-grained migration in conjunction with a global flag. RELNOTES: java_proto_library: control strict-deps through a rule-level and a package-level attribute. -- MOS_MIGRATED_REVID=128542363
* Open-source java_proto_library.Gravatar Carmi Grushko2016-07-12
| | | | | | | RELNOTES: New rule, java_proto_library, to generate Java bindings for protocol-buffers. -- MOS_MIGRATED_REVID=127136894
* Make java_classpath flag non-experimentalGravatar Liam Miller-Cushon2016-07-01
| | | | | -- MOS_MIGRATED_REVID=126310706
* Add java_plugin.generates_apiGravatar Liam Miller-Cushon2016-06-29
| | | | | | | | | | | | | | This attribute marks annotation processors that generate API code. If a rule uses an API-generating annotation processor, other rules depending on it can refer to the generated code only if their compilation actions are scheduled after the generating rule. In the future, annotation processors will only be considered by header compilation if they set generates_api=1. -- MOS_MIGRATED_REVID=126152384
* Reorganize Skylark Reference documentation.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126081020
* Deprecate top-level Java toolchain flags in favour of java_toolchainGravatar Liam Miller-Cushon2016-04-19
| | | | | | | | | | | | | This change disables --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top, and finishes replacing them with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar}. RELNOTES: Replace --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar} -- MOS_MIGRATED_REVID=120154954