Search in sources :

Example 1 with ScriptHandlerInternal

use of org.gradle.api.internal.initialization.ScriptHandlerInternal in project gradle by gradle.

the class SettingsFactory method createSettings.

public SettingsInternal createSettings(GradleInternal gradle, File settingsDir, ScriptSource settingsScript, Map<String, String> gradleProperties, StartParameter startParameter, ClassLoaderScope buildRootClassLoaderScope) {
    ClassLoaderScope settingsClassLoaderScope = buildRootClassLoaderScope.createChild("settings");
    ScriptHandlerInternal settingsScriptHandler = scriptHandlerFactory.create(settingsScript, settingsClassLoaderScope);
    DefaultSettings settings = instantiator.newInstance(DefaultSettings.class, serviceRegistryFactory, gradle, settingsClassLoaderScope, buildRootClassLoaderScope, settingsScriptHandler, settingsDir, settingsScript, startParameter);
    DynamicObject dynamicObject = ((DynamicObjectAware) settings).getAsDynamicObject();
    ((ExtensibleDynamicObject) dynamicObject).addProperties(gradleProperties);
    return settings;
}
Also used : ExtensibleDynamicObject(org.gradle.api.internal.ExtensibleDynamicObject) DynamicObject(org.gradle.internal.metaobject.DynamicObject) ClassLoaderScope(org.gradle.api.internal.initialization.ClassLoaderScope) ExtensibleDynamicObject(org.gradle.api.internal.ExtensibleDynamicObject) ScriptHandlerInternal(org.gradle.api.internal.initialization.ScriptHandlerInternal) DynamicObjectAware(org.gradle.api.internal.DynamicObjectAware)

Aggregations

DynamicObjectAware (org.gradle.api.internal.DynamicObjectAware)1 ExtensibleDynamicObject (org.gradle.api.internal.ExtensibleDynamicObject)1 ClassLoaderScope (org.gradle.api.internal.initialization.ClassLoaderScope)1 ScriptHandlerInternal (org.gradle.api.internal.initialization.ScriptHandlerInternal)1 DynamicObject (org.gradle.internal.metaobject.DynamicObject)1