diff options
author | Kristina Chodorow <kchodorow@google.com> | 2015-11-19 21:53:33 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-11-20 09:18:44 +0000 |
commit | 456aa7743ac0e68ad8f9a4261bbf655e4eb4fea3 (patch) | |
tree | 67e72a51e60b2d340f5bc7f5a93de1c346393359 /src | |
parent | 4bfd9502c0b358a333dfdb157dac1bc6b6d2042a (diff) |
Move static fields used by querying to query2
--
MOS_MIGRATED_REVID=108282005
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaImplicitAttributes.java | 27 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java | 10 |
2 files changed, 29 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaImplicitAttributes.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaImplicitAttributes.java new file mode 100644 index 0000000000..40b0d06342 --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaImplicitAttributes.java @@ -0,0 +1,27 @@ +// Copyright 2015 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.rules.java; + +/** + * Implicit attribute names that Java rules use, such as the JDK target name. + */ +public class JavaImplicitAttributes { + /** + * Label of a pseudo-filegroup that contains all jdk files for all + * configurations, as specified on the command-line. + */ + public static final String JDK_LABEL = "//tools/defaults:jdk"; + +} diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java index b54975a3e9..065e378d29 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java @@ -103,12 +103,6 @@ public interface JavaSemantics { OutputGroupProvider.HIDDEN_OUTPUT_GROUP_PREFIX + "gen_jars"; /** - * Label of a pseudo-filegroup that contains all jdk files for all - * configurations, as specified on the command-line. - */ - public static final String JDK_LABEL = "//tools/defaults:jdk"; - - /** * Label of a pseudo-filegroup that contains the boot-classpath entries. */ public static final String JAVAC_BOOTCLASSPATH_LABEL = "//tools/defaults:javac_bootclasspath"; @@ -145,7 +139,7 @@ public interface JavaSemantics { * Implementation for the :jvm attribute. */ public static final LateBoundLabel<BuildConfiguration> JVM = - new LateBoundLabel<BuildConfiguration>(JDK_LABEL, Jvm.class) { + new LateBoundLabel<BuildConfiguration>(JavaImplicitAttributes.JDK_LABEL, Jvm.class) { @Override public Label getDefault(Rule rule, BuildConfiguration configuration) { return configuration.getFragment(Jvm.class).getJvmLabel(); @@ -156,7 +150,7 @@ public interface JavaSemantics { * Implementation for the :host_jdk attribute. */ public static final LateBoundLabel<BuildConfiguration> HOST_JDK = - new LateBoundLabel<BuildConfiguration>(JDK_LABEL, Jvm.class) { + new LateBoundLabel<BuildConfiguration>(JavaImplicitAttributes.JDK_LABEL, Jvm.class) { @Override public boolean useHostConfiguration() { return true; |