Package org.gradle.configuration

Examples of org.gradle.configuration.ScriptPlugin.apply()


    private void applySettingsScript(SettingsLocation settingsLocation, ClassLoader buildSourceClassLoader, SettingsInternal settings) {
        ScriptPlugin configurer = configurerFactory.create(settingsLocation.getSettingsScriptSource());
        configurer.setClassLoader(buildSourceClassLoader);
        configurer.setScriptBaseClass(SettingsScript.class);
        configurer.apply(settings);
    }
}
View Full Code Here


    private void applyScript(Object script) {
        URI scriptUri = resolver.resolveUri(script);
        ScriptPlugin configurer = configurerFactory.create(new UriScriptSource("script", scriptUri));
        for (Object target : targets) {
            configurer.apply(target);
        }
    }

    private void applyPlugin(Class<? extends Plugin> pluginClass) {
        for (Object target : targets) {
View Full Code Here

        UriScriptSource scriptSource = new UriScriptSource("script", scriptUri);
        ClassLoaderScope classLoaderScopeChild = classLoaderScope.createChild();
        ScriptHandler scriptHandler = scriptHandlerFactory.create(scriptSource, classLoaderScopeChild);
        ScriptPlugin configurer = configurerFactory.create(scriptSource, scriptHandler, classLoaderScopeChild, classLoaderScope, "buildscript", DefaultScript.class, false);
        for (Object target : targets) {
            configurer.apply(target);
        }
    }

    private void applyPlugin(Class<? extends Plugin> pluginClass) {
        applyType(pluginClass);
View Full Code Here

    private void applySettingsScript(SettingsLocation settingsLocation, final SettingsInternal settings) {
        ScriptSource settingsScriptSource = settingsLocation.getSettingsScriptSource();
        ClassLoaderScope settingsClassLoaderScope = settings.getClassLoaderScope();
        ScriptHandler scriptHandler = scriptHandlerFactory.create(settingsScriptSource, settingsClassLoaderScope);
        ScriptPlugin configurer = configurerFactory.create(settingsScriptSource, scriptHandler, settingsClassLoaderScope, settings.getRootClassLoaderScope(), "buildscript", SettingsScript.class, false);
        configurer.apply(settings);
    }

}
View Full Code Here

    public void execute(ProjectInternal project) {
        LOGGER.info(String.format("Evaluating %s using %s.", project, project.getBuildScriptSource().getDisplayName()));
        Clock clock = new Clock();
        try {
            ScriptPlugin configurer = configurerFactory.create(project.getBuildScriptSource(), project.getBuildscript(), project.getClassLoaderScope(), project.getBaseClassLoaderScope(), "buildscript", ProjectScript.class, true);
            configurer.apply(project);
        } finally {
            LOGGER.debug("Timing: Running the build script took " + clock.getTime());
        }
    }
}
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.