tools/android/dependency_analysis/generate_json_dependency_graph.py
def list_original_targets_and_jars(gn_desc_output: str, build_output_dir: str,
                                   cr_position: int) -> JarTargetList:
    """Parses gn desc output to list original java targets and output jar paths.

    Returns a list of tuples (build_target: str, jar_path: str), where:
    - build_target is the original java dependency target in the form
      "//path/to:target"
    - jar_path is the path to the built jar in the build_output_dir,
      including the path to the output dir
    """
    jar_tuples: JarTargetList = []
    for build_target_line in gn_desc_output.split('\n'):
        if not build_target_line.endswith('__compile_java'):
            continue
        build_target = build_target_line.strip()
        original_build_target = build_target.replace('__compile_java', '')
        jar_path = _get_jar_path_for_target(build_output_dir, build_target,
                                            cr_position)
        jar_tuples.append((original_build_target, jar_path))
    return jar_tuples
Parses gn desc output to list original java targets and output jar paths.

    Returns a list of tuples (build_target: str, jar_path: str), where:
    - build_target is the original java dependency target in the form
      "//path/to:target"
    - jar_path is the path to the built jar in the build_output_dir,
      including the path to the output dir
    
Parses gn desc output to list original java targets and output jar paths.
Returns a list of tuples (build_target: str, jar_path: str), where:
build_target is the original java dependency target in the form
"//path/to:target"
jar_path is the path to the built jar in the build_output_dir,
including the path to the output dir
Parses gn desc output to list original java targets and output jar paths . Returns a list of tuples ( build_target : str jar_path : str ) where : build_target is the original java dependency target in the form " // path / to : target " jar_path is the path to the built jar in the build_output_dir including the path to the output dir
def list_original_targets_and_jars(gn_desc_output: str, build_output_dir: str,
                                   cr_position: int) -> JarTargetList:
    jar_tuples: JarTargetList = []
    for build_target_line in gn_desc_output.split('\n'):
        if not build_target_line.endswith('__compile_java'):
            continue
        build_target = build_target_line.strip()
        original_build_target = build_target.replace('__compile_java', '')
        jar_path = _get_jar_path_for_target(build_output_dir, build_target,
                                            cr_position)
        jar_tuples.append((original_build_target, jar_path))
    return jar_tuples
def list_original_targets_and_jars ( gn_desc_output : str , build_output_dir : str , cr_position : int ) -> JarTargetList : jar_tuples : JarTargetList = [ ] for build_target_line in gn_desc_output . split ( '\n' ) : if not build_target_line . endswith ( '__compile_java' ) : continue build_target = build_target_line . strip ( ) original_build_target = build_target . replace ( '__compile_java' , '' ) jar_path = _get_jar_path_for_target ( build_output_dir , build_target , cr_position ) jar_tuples . append ( ( original_build_target , jar_path ) ) return jar_tuples
Parses gn desc output to list original java targets and output jar paths.
Parses gn desc output to list original java targets and output jar paths .
"""Parses gn desc output to list original java targets and output jar paths.

    Returns a list of tuples (build_target: str, jar_path: str), where:
    - build_target is the original java dependency target in the form
      "//path/to:target"
    - jar_path is the path to the built jar in the build_output_dir,
      including the path to the output dir
    """
gn_desc_output
str
build_output_dir
str
cr_position
int