Class SdkInstaller


  • public class SdkInstaller
    extends Object
    Install an SDK by downloading, extracting and if necessary installing.
    • Method Detail

      • newInstaller

        public static SdkInstaller newInstaller​(Path managedSdkDirectory,
                                                Version version,
                                                OsInfo osInfo,
                                                String userAgentString,
                                                boolean usageReporting,
                                                Map<String,​String> environmentVariables)
        Configure and create a new Installer instance.
        Parameters:
        managedSdkDirectory - directory where the Cloud SDK will be installed
        version - version of the Cloud SDK to install
        osInfo - target operating system for installation
        userAgentString - user agent string for https requests
        usageReporting - enable client side usage reporting on gcloud
        environmentVariables - map of additional environment variables to be passed to the installer process (proxy settings, etc.)
        Returns:
        a new configured Cloud SDK Installer
      • newInstaller

        public static SdkInstaller newInstaller​(Path managedSdkDirectory,
                                                Version version,
                                                OsInfo osInfo,
                                                String userAgentString,
                                                boolean usageReporting,
                                                @Nullable
                                                Set<String> overrideComponents,
                                                Map<String,​String> environmentVariables)
        Configure and create a new Installer instance.
        Parameters:
        managedSdkDirectory - directory where the Cloud SDK will be installed
        version - version of the Cloud SDK to install
        osInfo - target operating system for installation
        userAgentString - user agent string for https requests
        usageReporting - enable client side usage reporting on gcloud
        environmentVariables - map of additional environment variables to be passed to the installer process (proxy settings, etc.)
        overrideComponents - gcloud components to install instead of the defaults
        Returns:
        a new configured Cloud SDK Installer