Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
build.Artifact Class Reference
Inheritance diagram for build.Artifact:
build.Page build.Style

Public Member Functions

def __init__ (self, str output, Sequence[str] inputs)
 
bool depends_on (self, str path)
 
def build (self)
 

Static Public Member Functions

def build_all ()
 
def build_matching (Callable[[Artifact], bool] predicate)
 

Public Attributes

 output
 
 inputs
 

Detailed Description

Represents a build artifact with its dependencies and way of building.

Definition at line 86 of file build.py.

Constructor & Destructor Documentation

◆ __init__()

def build.Artifact.__init__ (   self,
str  output,
Sequence[str]  inputs 
)

Reimplemented in build.Page, and build.Style.

Definition at line 95 of file build.py.

95 def __init__(self, output: str, inputs: Sequence[str]):
96 Artifact.all[output] = self
97 self.output = output
98 self.inputs = [os.path.normpath(input) for input in inputs]
99

Member Function Documentation

◆ build()

def build.Artifact.build (   self)
Convert artifact inputs into an output.

Reimplemented in build.Page, and build.Style.

Definition at line 104 of file build.py.

104 def build(self):
105 """Convert artifact inputs into an output."""
106
def build()
Definition: dom.py:52

◆ build_all()

def build.Artifact.build_all ( )
static
Build all artifacts.

Definition at line 108 of file build.py.

108 def build_all():
109 """Build all artifacts."""
110 Artifact.build_matching(lambda obj: True)
111

◆ build_matching()

def build.Artifact.build_matching ( Callable[[Artifact], bool]  predicate)
static
Build all artifacts matching the given filter.

Definition at line 113 of file build.py.

113 def build_matching(predicate: Callable[[Artifact], bool]):
114 """Build all artifacts matching the given filter."""
115 rebuilt = False
116 for _, artifact in Artifact.all.items():
117 if predicate(artifact):
118 artifact.build()
119 rebuilt = True
120
121 # If any artifacts were rebuilt notify the listeners.
122 if rebuilt:
123 for listener in Artifact.listeners:
124 listener()
125
126

◆ depends_on()

bool build.Artifact.depends_on (   self,
str  path 
)
Check if this

Reimplemented in build.Page, and build.Style.

Definition at line 100 of file build.py.

100 def depends_on(self, path: str) -> bool:
101 """Check if this"""
102 return path in self.inputs
103
static bool depends_on(GrRenderTask *depender, GrRenderTask *dependee)

Member Data Documentation

◆ inputs

build.Artifact.inputs

Definition at line 98 of file build.py.

◆ output

build.Artifact.output

Definition at line 97 of file build.py.


The documentation for this class was generated from the following file: