| 26 | |
| 27 | @dataclass |
| 28 | class Target: |
| 29 | identifier: str |
| 30 | name: str |
| 31 | product_type: str |
| 32 | product_name: Optional[str] |
| 33 | |
| 34 | @property |
| 35 | def buildable_name(self) -> str: |
| 36 | if self.product_name: |
| 37 | return self.product_name |
| 38 | if self.product_type.endswith(".application"): |
| 39 | return f"{self.name}.app" |
| 40 | if self.product_type.endswith(".bundle.ui-testing") or self.product_type.endswith(".bundle.unit-test"): |
| 41 | return f"{self.name}.xctest" |
| 42 | return self.name |
| 43 | |
| 44 | |
| 45 | TARGET_BLOCK_RE = re.compile( |