diff options
author | mstaib <mstaib@google.com> | 2017-09-26 01:42:15 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-09-26 12:31:12 +0200 |
commit | 7e918290f5d2aee85347ea45d89d05675a40817f (patch) | |
tree | 4c8401dc54ae076a401b37e9fcc996656afe790d /src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java | |
parent | 1752ae8451fe556de85972d245e1f85fcdbe5e19 (diff) |
Move --plugin to JavaOptions and remove --plugin_copt.
--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
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java index faaf5d0e06..e902005435 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java @@ -164,6 +164,7 @@ public final class JavaConfiguration extends Fragment { private final boolean explicitJavaTestDeps; private final boolean experimentalTestRunner; private final boolean jplPropagateCcLinkParamsStore; + private final ImmutableList<Label> pluginList; // TODO(dmarting): remove once we have a proper solution for #2539 private final boolean legacyBazelJavaTest; @@ -218,6 +219,7 @@ public final class JavaConfiguration extends Fragment { optimizersBuilder.put(mnemonic, Optional.fromNullable(optimizer.getValue())); } this.bytecodeOptimizers = optimizersBuilder.build(); + this.pluginList = ImmutableList.copyOf(javaOptions.pluginList); } @SkylarkCallable(name = "default_javac_flags", structField = true, @@ -420,4 +422,8 @@ public final class JavaConfiguration extends Fragment { public boolean jplPropagateCcLinkParamsStore() { return jplPropagateCcLinkParamsStore; } + + public List<Label> getPlugins() { + return pluginList; + } } |