tools/android/dependency_analysis/generate_json_dependency_graph.py
def _get_jar_path_for_target(build_output_dir: str, build_target: str,
                             cr_position: int) -> str:
    if cr_position == 0:  # Not running on main branch, use current convention.
        subdirectory = 'obj'
    elif cr_position < 761560:  # crrev.com/c/2161205
        subdirectory = 'gen'
    else:
        subdirectory = 'obj'
    """Calculates the output location of a jar for a java build target."""
    target_path, target_name = build_target.split(':')
    assert target_path.startswith('//'), \
        f'Build target should start with "//" but is: "{build_target}"'
    jar_dir = target_path[len('//'):]
    jar_name = target_name.replace('__compile_java', '.javac.jar')
    return pathlib.Path(build_output_dir) / subdirectory / jar_dir / jar_name
Calculates the output location of a jar for a java build target.
Calculates the output location of a jar for a java build target.
Calculates the output location of a jar for a java build target .
def _get_jar_path_for_target(build_output_dir: str, build_target: str,
                             cr_position: int) -> str:
    if cr_position == 0:  
        subdirectory = 'obj'
    elif cr_position < 761560:  
        subdirectory = 'gen'
    else:
        subdirectory = 'obj'
    target_path, target_name = build_target.split(':')
    assert target_path.startswith('//'), \
        f'Build target should start with "//" but is: "{build_target}"'
    jar_dir = target_path[len('//'):]
    jar_name = target_name.replace('__compile_java', '.javac.jar')
    return pathlib.Path(build_output_dir) / subdirectory / jar_dir / jar_name
def _get_jar_path_for_target ( build_output_dir : str , build_target : str , cr_position : int ) -> str : if cr_position == 0 : subdirectory = 'obj' elif cr_position < 761560 : subdirectory = 'gen' else : subdirectory = 'obj' target_path , target_name = build_target . split ( ':' ) assert target_path . startswith ( '//' ) , f'Build target should start with "//" but is: "{build_target}"' jar_dir = target_path [ len ( '//' ) : ] jar_name = target_name . replace ( '__compile_java' , '.javac.jar' ) return pathlib . Path ( build_output_dir ) / subdirectory / jar_dir / jar_name
Calculates the output location of a jar for a java build target.
Calculates the output location of a jar for a java build target .
# Not running on main branch, use current convention. # crrev.com/c/2161205 """Calculates the output location of a jar for a java build target."""
build_output_dir
str
build_target
str
cr_position
int