diff options
author | Florian Weikert <fwe@google.com> | 2015-07-28 08:26:24 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-07-29 15:58:38 +0000 |
commit | e6a2ebc876e9d8c23442fb8e9b037aec93ca538f (patch) | |
tree | 46143833bc138916b92c5459de5566dd2250ee65 /src/main | |
parent | ab13f687b3c90ab549d964af7a837b49f2fc9996 (diff) |
Introduced ctx.new_file_suffix(Artifact, String) as an alias for ctx.new_file(Artifact, String)
--
MOS_MIGRATED_REVID=99259144
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java index 94e7ae0bf3..2823f9632a 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java @@ -416,8 +416,15 @@ public final class SkylarkRuleContext { return ruleContext.getAnalysisEnvironment().getDerivedArtifact(fragment, root); } - @SkylarkCallable(doc = "Creates a new file object, derived from the given file and suffix. " - + DOC_NEW_FILE_TAIL) + @SkylarkCallable(doc = + "Creates a new file object, derived from the given file and suffix. " + DOC_NEW_FILE_TAIL) + public Artifact newFileSuffix(Artifact baseArtifact, String suffix) { + return newFile(baseArtifact, suffix); + } + + @SkylarkCallable(doc = + "Creates a new file object, derived from the given file and suffix. " + DOC_NEW_FILE_TAIL + + " Deprecated: Please use ctx.new_file_suffix() instead.") public Artifact newFile(Artifact baseArtifact, String suffix) { PathFragment original = baseArtifact.getRootRelativePath(); PathFragment fragment = original.replaceName(original.getBaseName() + suffix); |