aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Artifact.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index 5a98552c9b..d4de3db2ad 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -271,6 +271,9 @@ public class Artifact implements FileType.HasFilename, ActionInput, SkylarkValue
* package-path entries (for source Artifacts), or one of the bin, genfiles or includes dirs
* (for derived Artifacts). It will always be an ancestor of getPath().
*/
+ @SkylarkCallable(name = "root", structField = true,
+ doc = "The root beneath which this file resides."
+ )
public final Root getRoot() {
return root;
}
@@ -289,6 +292,8 @@ public class Artifact implements FileType.HasFilename, ActionInput, SkylarkValue
* root relationships. Note that this will report all Artifacts in the output
* tree, including in the include symlink tree, as non-source.
*/
+ @SkylarkCallable(name = "is_source", structField = true,
+ doc = "Returns true if this is a source file, i.e. it is not generated")
public final boolean isSourceArtifact() {
return execPath == rootRelativePath;
}