Interface SkylarkArtifactApi

  • All Superinterfaces:
    com.google.devtools.build.lib.skylarkinterface.SkylarkPrintable, com.google.devtools.build.lib.skylarkinterface.SkylarkValue
    All Known Subinterfaces:
    Artifact, BoundArtifact, BuildArtifact, SourceArtifact
    All Known Implementing Classes:
    SourceArtifactImpl

    public interface SkylarkArtifactApi
    extends com.google.devtools.build.lib.skylarkinterface.SkylarkValue
    Helper struct fields that should be available to users of Artifact inside of user defined rules

    Note, that unlike https://docs.bazel.build/versions/master/skylark/lib/File.html, we do not presently expose root, dirname, or path to give a fully constructed path from the repository root. Should this be necessary in the future, we may expose those things.

    • Method Detail

      • getBasename

        String getBasename()
      • getExtension

        String getExtension()
      • isSource

        boolean isSource()
      • getShortPath

        String getShortPath()
      • asSkylarkOutputArtifact

        SkylarkOutputArtifactApi asSkylarkOutputArtifact​(com.google.devtools.build.lib.events.Location location)
                                                  throws com.google.devtools.build.lib.syntax.EvalException
        Throws:
        com.google.devtools.build.lib.syntax.EvalException
      • isImmutable

        default boolean isImmutable()
        Specified by:
        isImmutable in interface com.google.devtools.build.lib.skylarkinterface.SkylarkValue