tools/android/sdk_updater/update_sdk.py
def _UploadSdkPackage(arguments):
  """Upload SDK packages to CIPD.

  Args:
    arguments: The arguments parsed by argparser.

  Raises:
    IOError: Don't use --version/--yaml-file for default packages.
  """
  packages = arguments.package
  if not packages:
    packages = _DEFAULT_DOWNLOAD_PACKAGES
    if arguments.version or arguments.yaml_file:
      raise IOError("Don't use --version/--yaml-file for default packages.")

  for package in packages:
    pkg_version = arguments.version
    if not pkg_version:
      pkg_version = _FindPackageVersion(package, arguments.sdk_root)

    # Upload SDK package to CIPD, and update the package instance ID hooking
    # in DEPS file.
    new_instance_id = UploadSdkPackage(
        os.path.join(arguments.sdk_root, '..'), arguments.dry_run,
        arguments.service_url, package, arguments.yaml_file, arguments.verbose)
    UpdateInstanceId(package, _SRC_DEPS_PATH, arguments.dry_run,
                     new_instance_id)

    if package in _GN_ARGUMENTS_TO_UPDATE:
      # Update the package version config in gn file
      arg_version = _GetArgVersion(pkg_version, package)
      ChangeVersionInGNI(package, arg_version, _GN_ARGUMENTS_TO_UPDATE,
                         _ANDROID_CONFIG_GNI_PATH, arguments.dry_run)
Upload SDK packages to CIPD.

  Args:
    arguments: The arguments parsed by argparser.

  Raises:
    IOError: Don't use --version/--yaml-file for default packages.
  
Upload SDK packages to CIPD.
Upload SDK packages to CIPD .
def _UploadSdkPackage(arguments):
  packages = arguments.package
  if not packages:
    packages = _DEFAULT_DOWNLOAD_PACKAGES
    if arguments.version or arguments.yaml_file:
      raise IOError("Don't use --version/--yaml-file for default packages.")
  for package in packages:
    pkg_version = arguments.version
    if not pkg_version:
      pkg_version = _FindPackageVersion(package, arguments.sdk_root)
    new_instance_id = UploadSdkPackage(
        os.path.join(arguments.sdk_root, '..'), arguments.dry_run,
        arguments.service_url, package, arguments.yaml_file, arguments.verbose)
    UpdateInstanceId(package, _SRC_DEPS_PATH, arguments.dry_run,
                     new_instance_id)
    if package in _GN_ARGUMENTS_TO_UPDATE:
      arg_version = _GetArgVersion(pkg_version, package)
      ChangeVersionInGNI(package, arg_version, _GN_ARGUMENTS_TO_UPDATE,
                         _ANDROID_CONFIG_GNI_PATH, arguments.dry_run)
def _UploadSdkPackage ( arguments ) : packages = arguments . package if not packages : packages = _DEFAULT_DOWNLOAD_PACKAGES if arguments . version or arguments . yaml_file : raise IOError ( "Don't use --version/--yaml-file for default packages." ) for package in packages : pkg_version = arguments . version if not pkg_version : pkg_version = _FindPackageVersion ( package , arguments . sdk_root ) new_instance_id = UploadSdkPackage ( os . path . join ( arguments . sdk_root , '..' ) , arguments . dry_run , arguments . service_url , package , arguments . yaml_file , arguments . verbose ) UpdateInstanceId ( package , _SRC_DEPS_PATH , arguments . dry_run , new_instance_id ) if package in _GN_ARGUMENTS_TO_UPDATE : arg_version = _GetArgVersion ( pkg_version , package ) ChangeVersionInGNI ( package , arg_version , _GN_ARGUMENTS_TO_UPDATE , _ANDROID_CONFIG_GNI_PATH , arguments . dry_run )
Upload SDK packages to CIPD.
Upload SDK packages to CIPD .
"""Upload SDK packages to CIPD.

  Args:
    arguments: The arguments parsed by argparser.

  Raises:
    IOError: Don't use --version/--yaml-file for default packages.
  """ # Upload SDK package to CIPD, and update the package instance ID hooking # in DEPS file. # Update the package version config in gn file
Don't use --version/--yaml-file for default packages.
Don ' t use -- version / -- yaml - file for default packages .
IOError
arguments
The arguments parsed by argparser.
The arguments parsed by argparser .