third_party/androidx/fetch_all_androidx.py
def _download_and_parse_build_info():
    """Downloads and parses BUILD_INFO file."""
    with _build_dir() as build_dir:
        androidx_build_info_response = request.urlopen(
            _ANDROIDX_LATEST_SNAPSHOT_BUILD_INFO_URL)
        androidx_build_info_path = os.path.join(build_dir, 'BUILD_INFO')
        with open(androidx_build_info_path, 'w') as f:
            f.write(androidx_build_info_response.read().decode('utf-8'))

        # Strip '/repository' from pattern.
        resolved_snapshot_repository_url_pattern = (
            _build_snapshot_repository_url('([0-9]*)').rsplit('/', 1)[0])

        version = re.match(resolved_snapshot_repository_url_pattern,
                           androidx_build_info_response.geturl()).group(1)

        with open(androidx_build_info_path, 'r') as f:
            build_info_dict = json.loads(f.read())
        dir_list = build_info_dict['target']['dir_list']

        dependency_version_map = _parse_dir_list(dir_list)
        return (dependency_version_map, version)
Downloads and parses BUILD_INFO file.
Downloads and parses BUILD_INFO file.
Downloads and parses BUILD_INFO file .
def _download_and_parse_build_info():
    with _build_dir() as build_dir:
        androidx_build_info_response = request.urlopen(
            _ANDROIDX_LATEST_SNAPSHOT_BUILD_INFO_URL)
        androidx_build_info_path = os.path.join(build_dir, 'BUILD_INFO')
        with open(androidx_build_info_path, 'w') as f:
            f.write(androidx_build_info_response.read().decode('utf-8'))
        resolved_snapshot_repository_url_pattern = (
            _build_snapshot_repository_url('([0-9]*)').rsplit('/', 1)[0])
        version = re.match(resolved_snapshot_repository_url_pattern,
                           androidx_build_info_response.geturl()).group(1)
        with open(androidx_build_info_path, 'r') as f:
            build_info_dict = json.loads(f.read())
        dir_list = build_info_dict['target']['dir_list']
        dependency_version_map = _parse_dir_list(dir_list)
        return (dependency_version_map, version)
def _download_and_parse_build_info ( ) : with _build_dir ( ) as build_dir : androidx_build_info_response = request . urlopen ( _ANDROIDX_LATEST_SNAPSHOT_BUILD_INFO_URL ) androidx_build_info_path = os . path . join ( build_dir , 'BUILD_INFO' ) with open ( androidx_build_info_path , 'w' ) as f : f . write ( androidx_build_info_response . read ( ) . decode ( 'utf-8' ) ) resolved_snapshot_repository_url_pattern = ( _build_snapshot_repository_url ( '([0-9]*)' ) . rsplit ( '/' , 1 ) [ 0 ] ) version = re . match ( resolved_snapshot_repository_url_pattern , androidx_build_info_response . geturl ( ) ) . group ( 1 ) with open ( androidx_build_info_path , 'r' ) as f : build_info_dict = json . loads ( f . read ( ) ) dir_list = build_info_dict [ 'target' ] [ 'dir_list' ] dependency_version_map = _parse_dir_list ( dir_list ) return ( dependency_version_map , version )
Downloads and parses BUILD_INFO file.
Downloads and parses BUILD_INFO file .
"""Downloads and parses BUILD_INFO file.""" # Strip '/repository' from pattern.