1// Copyright 2022 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14package app
15
16// Query
17type BuildQuery struct {
18	Target  string   `json:"target"`
19	Inputs  []string `json:"inputs"`
20	Outputs []string `json:"outputs"`
21}
22
23// Input
24type BuildInput struct {
25	Target string   `json:"target"`
26	Files  []string `json:"files"`
27}
28
29// Commands
30type BuildCommand struct {
31	Target string   `json:"target"`
32	Cmds   []string `json:"cmds"`
33}
34
35// Path
36type BuildPath struct {
37	Target     string   `json:"target"`
38	Dependency string   `json:"dependency"`
39	Paths      []string `json:paths"`
40}
41
42// Build target
43type BuildTarget struct {
44	Name      string                 `json:"name"`        // Target name
45	Steps     int                    `json:"build_steps"` // Number of steps to build target
46	FileCount int                    `json:"files"`       // Number of input files for a target
47	Projects  map[string]*GitProject `json:"projects"`    // Inputs projects/files of a target
48}
49
50// Build command result
51type BuildCmdResult struct {
52	Name    string   `json:"name"`
53	Output  []string `json:"output"`
54	Success bool     `json:"success"`
55}
56
57// Build dependencies
58type BuildDeps struct {
59	Targets map[string][]string `json:"targets"`
60}
61