diff options
author | 2016-01-19 15:58:11 +0000 | |
---|---|---|
committer | 2016-01-19 16:41:05 +0000 | |
commit | ddda06d8250fd70a320bd9aa926fd1dd7d52c6f3 (patch) | |
tree | e42c30cb5e17f63b9e5f4a95e70e8324c5839323 /src/main/java/com/google/devtools/build/lib/actions/Artifact.java | |
parent | 56b55874a7bac3bd9eb7615fbc18cb0d15d5ee21 (diff) |
Skylark IDE info aspect: sources and dependencies.
1. Refactored IntelliJSkylarkAspectTest. Eventually that test will be
merged with AndroidStudioInfoAspect test to validate implementation
equivalence.
2. Exposed ``root`` and ``is_source`` on Artifacts to Skylark.
3. Skylark aspect implementation outputs sources and dependencies
information.
--
MOS_MIGRATED_REVID=112473407
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Artifact.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Artifact.java | 5 |
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; } |