Package org.netbeans.gradle.model.util

Examples of org.netbeans.gradle.model.util.TemporaryFileRef


                toPastableString(ClassLoaderUtils.getLocationOfClassPath().getPath()));

        TemporaryFileManager fileManager = TemporaryFileManager.getDefault();

        ModelQueryInput modelInput = new ModelQueryInput(projectInfoBuilders.getSerializableBuilderMap());
        TemporaryFileRef modelInputFile = fileManager.createFileFromSerialized(modelInputPrefix, modelInput);
        try {
            initScript = initScript.replace("$INPUT_FILE", toPastableString(modelInputFile.getFile()));

            TemporaryFileRef initScriptRef = fileManager
                    .createFile(initScriptPrefix, initScript, INIT_SCRIPT_ENCODING);
            try {
                String[] executerArgs = new String[userArgs.length + 2];
                System.arraycopy(userArgs, 0, executerArgs, 0, userArgs.length);

                executerArgs[executerArgs.length - 2] = "--init-script";
                executerArgs[executerArgs.length - 1] = initScriptRef.getFile().getPath();

                executer.withArguments(executerArgs);

                return transformActionModels(executer.run());
            } finally {
                initScriptRef.close();
            }
        } finally {
            modelInputFile.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.model.util.TemporaryFileRef

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.