Package org.gradle.groovy.scripts

Examples of org.gradle.groovy.scripts.ScriptSource


                    }
                });
            }
        };

        ScriptSource source = scriptSource("transformMe()");
        scriptCompilationHandler.compileToDir(source, classLoader, scriptCacheDir, visitor, expectedScriptClass, verifier);
        Script script = scriptCompilationHandler.loadFromDir(source, classLoader, scriptCacheDir, expectedScriptClass).newInstance();
        evaluateScript(script);
    }
View Full Code Here


        logger.debug("Timing: Processing settings took: {}", settingsProcessingClock.getTime());
        return settings;
    }

    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

    private final Map<String, ScriptSource> scripts = new HashMap<String, ScriptSource>();

    public void beforeScript(Script script) {
        lock.lock();
        try {
            ScriptSource scriptSource = script.getScriptSource();
            scripts.put(scriptSource.getFileName(), scriptSource);
        } finally {
            lock.unlock();
        }
    }
View Full Code Here

            reportStackTraceElement(indirectCaller, target);
        }
    }

    private void reportStackTraceElement(StackTraceElement stackTraceElement, StringBuilder target) {
        ScriptSource scriptSource = scripts.get(stackTraceElement.getFileName());
        target.append(StringUtils.capitalize(scriptSource.getDisplayName()));
        if (stackTraceElement.getLineNumber() > 0) {
            target.append(": line ");
            target.append(stackTraceElement.getLineNumber());
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.groovy.scripts.ScriptSource

Copyright © 2018 www.massapicom. 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.