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. 14 15package report 16 17import ( 18 "context" 19 20 "tools/treble/build/report/app" 21) 22 23type BuildDependencies interface { 24 Command(ctx context.Context, target string) (*app.BuildCommand, error) 25 Input(ctx context.Context, target string) (*app.BuildInput, error) 26 Query(ctx context.Context, target string) (*app.BuildQuery, error) 27 Path(ctx context.Context, target string, dependency string) (*app.BuildPath, error) 28 Paths(ctx context.Context, target string, dependency string) ([]*app.BuildPath, error) 29 Deps(ctx context.Context) (*app.BuildDeps, error) 30} 31 32type ProjectDependencies interface { 33 Project(ctx context.Context, path string, gitDir string, remote string, revision string) (*app.GitProject, error) 34 PopulateFiles(ctx context.Context, proj *app.GitProject, upstream string) error 35 CommitInfo(ctx context.Context, proj *app.GitProject, sha string) (*app.GitCommit, error) 36} 37 38type RepoDependencies interface { 39 Manifest(filename string) (*app.RepoManifest, error) 40} 41