With this, dependency-mapper can accept a list of other jars that the source under analysis depends upon, and it will include a list of classes from those jars that source references. : Fix - Fix DependencyMapperTest - Various formatting cleanups Bug: 418279584 Test: m SystemUI-core Change-Id: I7e4e395d8f4360af389caf6575404ed92d69da99
283 lines
10 KiB
Go
283 lines
10 KiB
Go
//
|
|
// Copyright (C) 2025 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.33.0
|
|
// protoc v3.21.12
|
|
// source: dependency.proto
|
|
|
|
package protoimpl
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type FileDependency struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// java file path on disk
|
|
FilePath *string `protobuf:"bytes,1,opt,name=file_path,json=filePath" json:"file_path,omitempty"`
|
|
// if a change in this file warrants recompiling all files
|
|
IsDependencyToAll *bool `protobuf:"varint,2,opt,name=is_dependency_to_all,json=isDependencyToAll" json:"is_dependency_to_all,omitempty"`
|
|
// class files generated when this java file is compiled
|
|
GeneratedClasses []string `protobuf:"bytes,3,rep,name=generated_classes,json=generatedClasses" json:"generated_classes,omitempty"`
|
|
// dependencies of this file.
|
|
FileDependencies []string `protobuf:"bytes,4,rep,name=file_dependencies,json=fileDependencies" json:"file_dependencies,omitempty"`
|
|
// class dependencies - likely from kotlin.
|
|
CrossModuleClassDeps []string `protobuf:"bytes,5,rep,name=cross_module_class_deps,json=crossModuleClassDeps" json:"cross_module_class_deps,omitempty"`
|
|
}
|
|
|
|
func (x *FileDependency) Reset() {
|
|
*x = FileDependency{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_dependency_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *FileDependency) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileDependency) ProtoMessage() {}
|
|
|
|
func (x *FileDependency) ProtoReflect() protoreflect.Message {
|
|
mi := &file_dependency_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileDependency.ProtoReflect.Descriptor instead.
|
|
func (*FileDependency) Descriptor() ([]byte, []int) {
|
|
return file_dependency_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *FileDependency) GetFilePath() string {
|
|
if x != nil && x.FilePath != nil {
|
|
return *x.FilePath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileDependency) GetIsDependencyToAll() bool {
|
|
if x != nil && x.IsDependencyToAll != nil {
|
|
return *x.IsDependencyToAll
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *FileDependency) GetGeneratedClasses() []string {
|
|
if x != nil {
|
|
return x.GeneratedClasses
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileDependency) GetFileDependencies() []string {
|
|
if x != nil {
|
|
return x.FileDependencies
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileDependency) GetCrossModuleClassDeps() []string {
|
|
if x != nil {
|
|
return x.CrossModuleClassDeps
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// *
|
|
// A com.android.dependencymapper.DependencyProto.FileDependencyList object.
|
|
type FileDependencyList struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// List of java file usages
|
|
FileDependency []*FileDependency `protobuf:"bytes,1,rep,name=fileDependency" json:"fileDependency,omitempty"`
|
|
}
|
|
|
|
func (x *FileDependencyList) Reset() {
|
|
*x = FileDependencyList{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_dependency_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *FileDependencyList) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileDependencyList) ProtoMessage() {}
|
|
|
|
func (x *FileDependencyList) ProtoReflect() protoreflect.Message {
|
|
mi := &file_dependency_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileDependencyList.ProtoReflect.Descriptor instead.
|
|
func (*FileDependencyList) Descriptor() ([]byte, []int) {
|
|
return file_dependency_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *FileDependencyList) GetFileDependency() []*FileDependency {
|
|
if x != nil {
|
|
return x.FileDependency
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_dependency_proto protoreflect.FileDescriptor
|
|
|
|
var file_dependency_proto_rawDesc = []byte{
|
|
0x0a, 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f,
|
|
0x74, 0x6f, 0x12, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
|
|
0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72,
|
|
0x22, 0xef, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
|
|
0x6e, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68,
|
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68,
|
|
0x12, 0x2f, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
|
|
0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11,
|
|
0x69, 0x73, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x6f, 0x41, 0x6c,
|
|
0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63,
|
|
0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x67, 0x65,
|
|
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2b,
|
|
0x0a, 0x11, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
|
|
0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x44,
|
|
0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63,
|
|
0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73,
|
|
0x73, 0x5f, 0x64, 0x65, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x72,
|
|
0x6f, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x44, 0x65,
|
|
0x70, 0x73, 0x22, 0x6a, 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64,
|
|
0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65,
|
|
0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
|
0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x64,
|
|
0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e,
|
|
0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e,
|
|
0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x4e,
|
|
0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x64, 0x65,
|
|
0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x42, 0x0f,
|
|
0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a,
|
|
0x1d, 0x67, 0x6f, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x6d, 0x61,
|
|
0x70, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x69, 0x6d, 0x70, 0x6c,
|
|
}
|
|
|
|
var (
|
|
file_dependency_proto_rawDescOnce sync.Once
|
|
file_dependency_proto_rawDescData = file_dependency_proto_rawDesc
|
|
)
|
|
|
|
func file_dependency_proto_rawDescGZIP() []byte {
|
|
file_dependency_proto_rawDescOnce.Do(func() {
|
|
file_dependency_proto_rawDescData = protoimpl.X.CompressGZIP(file_dependency_proto_rawDescData)
|
|
})
|
|
return file_dependency_proto_rawDescData
|
|
}
|
|
|
|
var file_dependency_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_dependency_proto_goTypes = []interface{}{
|
|
(*FileDependency)(nil), // 0: com.android.dependencymapper.FileDependency
|
|
(*FileDependencyList)(nil), // 1: com.android.dependencymapper.FileDependencyList
|
|
}
|
|
var file_dependency_proto_depIdxs = []int32{
|
|
0, // 0: com.android.dependencymapper.FileDependencyList.fileDependency:type_name -> com.android.dependencymapper.FileDependency
|
|
1, // [1:1] is the sub-list for method output_type
|
|
1, // [1:1] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_dependency_proto_init() }
|
|
func file_dependency_proto_init() {
|
|
if File_dependency_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_dependency_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*FileDependency); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_dependency_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*FileDependencyList); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_dependency_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_dependency_proto_goTypes,
|
|
DependencyIndexes: file_dependency_proto_depIdxs,
|
|
MessageInfos: file_dependency_proto_msgTypes,
|
|
}.Build()
|
|
File_dependency_proto = out.File
|
|
file_dependency_proto_rawDesc = nil
|
|
file_dependency_proto_goTypes = nil
|
|
file_dependency_proto_depIdxs = nil
|
|
}
|