Examples of AndroidSdk


Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

    public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
            throws InterruptedException, IOException {
        final PrintStream logger = listener.getLogger();

        // Ensure we have an SDK, and export ANDROID_HOME
        AndroidSdk androidSdk = getAndroidSdk(build, launcher, listener);
        if (androidSdk == null) {
            return false;
        }

        // Gather list of projects, determined by reading Android project files in the workspace
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

            log(logger, Messages.NO_PROJECTS_FOUND_FOR_PREREQUISITES());
            return true;
        }

        // Ensure we have an SDK
        AndroidSdk androidSdk = getAndroidSdk(build, launcher, listener);
        if (androidSdk == null) {
            return false;
        }

        // Install platform(s)
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

                androidHome);

        // Get Android SDK object from the given root (or locate on PATH)
        final String androidSdkHome = (envVars != null && keepInWorkspace ? envVars
                .get("WORKSPACE") : null);
        AndroidSdk androidSdk = Utils
                .getAndroidSdk(launcher, discoveredAndroidHome, androidSdkHome);

        // Check whether we should install the SDK
        if (androidSdk == null) {
            PrintStream logger = listener.getLogger();
            if (!shouldInstallSdk) {
                // Couldn't find an SDK, don't want to install it, give up
                log(logger, Messages.SDK_TOOLS_NOT_FOUND());
                return null;
            }

            // Ok, let's download and install the SDK
            log(logger, Messages.INSTALLING_SDK());
            try {
                androidSdk = SdkInstaller.install(launcher, listener, null);
            } catch (SdkInstallationException e) {
                log(logger, Messages.SDK_INSTALLATION_FAILED(), e);
                return null;
            }

            // Check whether anything went wrong
            if (androidSdk == null) {
                log(logger, Messages.SDK_INSTALLATION_FAILED());
                return null;
            }
        }

        // Export environment variables
        final String sdkRoot = androidSdk.getSdkRoot();
        build.addAction(new EnvironmentContributingAction() {

            public void buildEnvVars(AbstractBuild<?, ?> build, EnvVars envVars) {
                if (envVars != null) {
                    envVars.put("ANDROID_HOME", sdkRoot);
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

            build.setResult(Result.NOT_BUILT);
            return null;
        }

        // Confirm that the required SDK tools are available
        AndroidSdk androidSdk = Utils.getAndroidSdk(launcher, androidHome, androidSdkHome);
        if (androidSdk == null) {
            if (!descriptor.shouldInstallSdk) {
                // Couldn't find an SDK, don't want to install it, give up
                log(logger, Messages.SDK_TOOLS_NOT_FOUND());
                build.setResult(Result.NOT_BUILT);
                return null;
            }

            // Ok, let's download and install the SDK
            log(logger, Messages.INSTALLING_SDK());
            try {
                androidSdk = SdkInstaller.install(launcher, listener, androidSdkHome);
            } catch (SdkInstallationException e) {
                log(logger, Messages.SDK_INSTALLATION_FAILED(), e);
                build.setResult(Result.NOT_BUILT);
                return null;
            }
        } else if (descriptor.shouldKeepInWorkspace) {
            SdkInstaller.optOutOfSdkStatistics(launcher, listener, androidSdkHome);
        }

        // Install the required SDK components for the desired platform, if necessary
        if (descriptor.shouldInstallSdk) {
            SdkInstaller.installDependencies(logger, launcher, androidSdk, emuConfig);
        }

        // Ok, everything looks good.. let's go
        String displayHome = androidSdk.hasKnownRoot() ? androidSdk.getSdkRoot() : Messages.USING_PATH();
        log(logger, Messages.USING_SDK(displayHome));

        return doSetUp(build, launcher, listener, androidSdk, emuConfig, expandedProperties);
    }
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

        // Check whether we need to install the SDK components
        if (!isSdkInstallComplete(node, androidHome)) {
            PrintStream logger = listener.getLogger();
            log(logger, Messages.INSTALLING_REQUIRED_COMPONENTS());
            AndroidSdk sdk = getAndroidSdkForNode(node, androidHome, androidSdkHome);

            // Get the latest platform-tools
            installComponent(logger, launcher, sdk, "platform-tool");

            // Upgrade the tools if necessary and add the latest build-tools component
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

    @SuppressWarnings("serial")
    private static AndroidSdk getAndroidSdkForNode(Node node, final String androidHome,
            final String androidSdkHome) throws IOException, InterruptedException {
        return node.getChannel().call(new Callable<AndroidSdk, IOException>() {
            public AndroidSdk call() throws IOException {
                return new AndroidSdk(androidHome, androidSdkHome);
            }
        });
    }
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

    public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
            throws InterruptedException, IOException {
        final PrintStream logger = listener.getLogger();

        // Discover Android SDK
        AndroidSdk androidSdk = getAndroidSdk(build, launcher, listener);
        if (androidSdk == null) {
            return false;
        }

        // Check whether a value was provided
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

                        return null;
                    }
                }

                // Create SDK instance with what we know so far
                return new AndroidSdk(sdkRoot, androidSdkHome);
            }
            private static final long serialVersionUID = 1L;
        };

        try {
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

    public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
            throws InterruptedException, IOException {
        final PrintStream logger = listener.getLogger();

        // Discover Android SDK
        AndroidSdk androidSdk = getAndroidSdk(build, launcher, listener);
        if (androidSdk == null) {
            return false;
        }

        // Check whether a value was provided
View Full Code Here

Examples of hudson.plugins.android_emulator.sdk.AndroidSdk

    public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
            throws InterruptedException, IOException {
        final PrintStream logger = listener.getLogger();

        // Discover Android SDK
        AndroidSdk androidSdk = getAndroidSdk(build, launcher, listener);
        if (androidSdk == null) {
            return false;
        }

        // Set up arguments to adb
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.