Class SdkInstaller
- java.lang.Object
-
- com.google.cloud.tools.managedcloudsdk.install.SdkInstaller
-
public class SdkInstaller extends Object
Install an SDK by downloading, extracting and if necessary installing.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
install(ProgressListener progressListener, ConsoleListener consoleListener)
Download and install a new Cloud SDK.static SdkInstaller
newInstaller(Path managedSdkDirectory, Version version, OsInfo osInfo, String userAgentString, boolean usageReporting, Map<String,String> environmentVariables)
Configure and create a new Installer instance.static SdkInstaller
newInstaller(Path managedSdkDirectory, Version version, OsInfo osInfo, String userAgentString, boolean usageReporting, Set<String> overrideComponents, Map<String,String> environmentVariables)
Configure and create a new Installer instance.
-
-
-
Method Detail
-
install
public Path install(ProgressListener progressListener, ConsoleListener consoleListener) throws IOException, InterruptedException, SdkInstallerException, CommandExecutionException, CommandExitException
Download and install a new Cloud SDK.
-
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 installedversion
- version of the Cloud SDK to installosInfo
- target operating system for installationuserAgentString
- user agent string for https requestsusageReporting
- enable client side usage reporting on gcloudenvironmentVariables
- 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 installedversion
- version of the Cloud SDK to installosInfo
- target operating system for installationuserAgentString
- user agent string for https requestsusageReporting
- enable client side usage reporting on gcloudenvironmentVariables
- 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
-
-