Package org.gradle.groovy.scripts.internal

Examples of org.gradle.groovy.scripts.internal.StatementExtractingScriptTransformer$Inverse


            boolean supportsPluginsBlock = ProjectScript.class.isAssignableFrom(scriptType);
            String onPluginBlockError = supportsPluginsBlock ? null : "Only Project build scripts can contain plugins {} blocks";

            PluginsAndBuildscriptTransformer scriptBlockTransformer = new PluginsAndBuildscriptTransformer(classpathClosureName, onPluginBlockError, documentationRegistry);

            StatementExtractingScriptTransformer classpathScriptTransformer = new StatementExtractingScriptTransformer(classpathClosureName, scriptBlockTransformer);

            compiler.setTransformer(classpathScriptTransformer);

            ScriptRunner<? extends BasicScript> classPathScriptRunner = compiler.compile(scriptType);
            classPathScriptRunner.getScript().init(target, services);
            classPathScriptRunner.run();

            List<PluginRequest> pluginRequests = pluginDependenciesService.getRequests();
            PluginAware pluginAware = target instanceof PluginAware ? (PluginAware) target : null;
            pluginRequestApplicator.applyPlugins(pluginRequests, scriptHandler, pluginAware, targetScope);

            compiler.setClassloader(targetScope.getLocalClassLoader());

            BuildScriptTransformer transformer = new BuildScriptTransformer("no_" + classpathScriptTransformer.getId(), classpathScriptTransformer.invert(), scriptSource);
            compiler.setTransformer(transformer);

            // TODO - find a less tangled way of getting this in here, see the verifier impl for why it's needed
            compiler.setVerifier(new ClosureCreationInterceptingVerifier());
View Full Code Here

TOP

Related Classes of org.gradle.groovy.scripts.internal.StatementExtractingScriptTransformer$Inverse

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.