Search in sources :

Example 1 with ExtensibleDynamicObject

use of org.gradle.internal.extensibility.ExtensibleDynamicObject in project gradle by gradle.

the class SettingsFactory method createSettings.

public SettingsInternal createSettings(GradleInternal gradle, File settingsDir, ScriptSource settingsScript, GradleProperties gradleProperties, StartParameter startParameter, ClassLoaderScope baseClassLoaderScope) {
    ClassLoaderScope classLoaderScope = baseClassLoaderScope.createChild("settings[" + gradle.getIdentityPath() + "]");
    DefaultSettings settings = instantiator.newInstance(DefaultSettings.class, serviceRegistryFactory, gradle, classLoaderScope, baseClassLoaderScope, scriptHandlerFactory.create(settingsScript, classLoaderScope), settingsDir, settingsScript, startParameter);
    Map<String, Object> properties = gradleProperties.mergeProperties(emptyMap());
    DynamicObject dynamicObject = ((DynamicObjectAware) settings).getAsDynamicObject();
    ((ExtensibleDynamicObject) dynamicObject).addProperties(properties);
    return settings;
}
Also used : DynamicObject(org.gradle.internal.metaobject.DynamicObject) ExtensibleDynamicObject(org.gradle.internal.extensibility.ExtensibleDynamicObject) ClassLoaderScope(org.gradle.api.internal.initialization.ClassLoaderScope) ExtensibleDynamicObject(org.gradle.internal.extensibility.ExtensibleDynamicObject) DynamicObject(org.gradle.internal.metaobject.DynamicObject) ExtensibleDynamicObject(org.gradle.internal.extensibility.ExtensibleDynamicObject) DynamicObjectAware(org.gradle.api.internal.DynamicObjectAware)

Aggregations

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