Search in sources :

Example 1 with WindowsStartScriptGenerator

use of org.gradle.api.internal.plugins.WindowsStartScriptGenerator in project gradle by gradle.

the class CreateStartScripts method generate.

@TaskAction
public void generate() {
    StartScriptGenerator generator = new StartScriptGenerator(unixStartScriptGenerator, windowsStartScriptGenerator);
    generator.setApplicationName(getApplicationName());
    generator.setMainClassName(getMainClassName());
    generator.setDefaultJvmOpts(getDefaultJvmOpts());
    generator.setOptsEnvironmentVar(getOptsEnvironmentVar());
    generator.setExitEnvironmentVar(getExitEnvironmentVar());
    generator.setClasspath(getRelativeClasspath());
    generator.setScriptRelPath(getExecutableDir() + "/" + getUnixScript().getName());
    generator.generateUnixScript(getUnixScript());
    generator.generateWindowsScript(getWindowsScript());
}
Also used : UnixStartScriptGenerator(org.gradle.api.internal.plugins.UnixStartScriptGenerator) StartScriptGenerator(org.gradle.api.internal.plugins.StartScriptGenerator) WindowsStartScriptGenerator(org.gradle.api.internal.plugins.WindowsStartScriptGenerator) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

StartScriptGenerator (org.gradle.api.internal.plugins.StartScriptGenerator)1 UnixStartScriptGenerator (org.gradle.api.internal.plugins.UnixStartScriptGenerator)1 WindowsStartScriptGenerator (org.gradle.api.internal.plugins.WindowsStartScriptGenerator)1 TaskAction (org.gradle.api.tasks.TaskAction)1