Documentation
¶
Overview ¶
Package sdk wraps sdkmanager for high-level SDK management operations.
Index ¶
- type Bootstrapper
- type Package
- type Service
- func (s *Service) AcceptLicenses(ctx context.Context) (int, error)
- func (s *Service) Install(ctx context.Context, packages []string) error
- func (s *Service) List(ctx context.Context, installed, available bool, channel string) ([]Package, error)
- func (s *Service) Uninstall(ctx context.Context, packages []string) error
- func (s *Service) Update(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrapper ¶
type Bootstrapper struct{}
Bootstrapper installs Android SDK command-line tools from scratch. It has no dependency on android.SDKLocator and works without any pre-existing SDK.
func (*Bootstrapper) Bootstrap ¶
func (b *Bootstrapper) Bootstrap(ctx context.Context, targetDir string, force bool) (string, bool, error)
Bootstrap installs cmdline-tools into the resolved SDK root. targetDir overrides auto-detection when non-empty; otherwise the resolution order is $ANDROID_HOME → $ANDROID_SDK_ROOT → platform default. Returns (sdkRoot, alreadyInstalled, error).
type Package ¶
type Package struct {
Path string
Version string
Description string
Location string
Installed bool
}
Package represents an SDK package entry from sdkmanager --list.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps sdkmanager operations.
func (*Service) AcceptLicenses ¶
AcceptLicenses pipes "y" to all license prompts.
func (*Service) List ¶
func (s *Service) List(ctx context.Context, installed, available bool, channel string) ([]Package, error)
List returns installed and/or available SDK packages.