• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	"tools/treble/build/report/app"
19)
20
21type RepoMan struct {
22}
23
24func (r *RepoMan) Manifest(filename string) (*app.RepoManifest, error) {
25	return app.ParseXml(filename)
26}
27
28// Project information containing a map of projects, this also contains a
29// map between a source file and the project it belongs to
30// allowing a quicker lookup of source file to project
31type ProjectInfo struct {
32	ProjMap   map[string]*project // Map project name to project
33	FileCache map[string]*project // Map source files to project
34}
35
36// Report context
37type Context struct {
38	RepoBase         string              // Absolute path to repo base
39	Repo             RepoDependencies    // Repo interface
40	Build            BuildDependencies   // Build interface
41	Project          ProjectDependencies // Project interface
42	WorkerCount      int                 // Number of worker threads
43	BuildWorkerCount int                 // Number of build worker threads
44	Info             *ProjectInfo        // Project information
45}
46