diff options
author | 2018-04-27 21:25:43 -0700 | |
---|---|---|
committer | 2018-04-27 21:26:46 -0700 | |
commit | 1b672c2d15cea87e525faace615e1eb1fd6851fa (patch) | |
tree | b16e37b215f5bbda4fdb37b820044a2dc1b35ce1 /src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java | |
parent | 15933a7a2dce343043d9f123a50f788120c9e849 (diff) |
Adding a check to verify the usage of the migration tag for the Skylark
migration, when a flag is enabled.
RELNOTES:
PiperOrigin-RevId: 194630925
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java new file mode 100644 index 0000000000..2097a4b3bd --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidMigrationSemantics.java @@ -0,0 +1,30 @@ +// Copyright 2018 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.android; + +import com.google.devtools.build.lib.analysis.RuleContext; +import com.google.devtools.build.lib.packages.RuleClass.ConfiguredTargetFactory.RuleErrorException; + +/** + * Pluggable semantics for Android rules migration. + */ +public interface AndroidMigrationSemantics { + + /** + * Validates the {@link RuleContext} against common migration checks. + * + * @throws RuleErrorException + */ + public void validateRuleContext(RuleContext ruleContext) throws RuleErrorException; +} |