blob: 12d6fe04372c58c97b47e7521df7a725ecf82ed6 [file] [view]
// 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.
# Dependency Mapper
[dependency-mapper] command line tool. This tool finds the usage based dependencies between java
files by utilizing byte-code and java file analysis.
# Getting Started
## Inputs
* rsp file, containing list of java files separated by whitespace.
* jar file, containing class files generated after compiling the contents of rsp file.
## Output
* proto file, representing the list of dependencies for each java file present in input rsp file,
represented by [proto/dependency.proto]
## Usage
```
dependency-mapper --src-path [src-list.rsp] --jar-path [classes.jar] --usage-map-path [usage-map.proto]
```
# Notes
## Dependencies enlisted are only within the java files present in input.
## To ensure dependencies are listed correctly classes jar should contain every class files generated from each source file.