Package org.gradle.api.tasks

Examples of org.gradle.api.tasks.JavaExec


    @SuppressWarnings("serial")
    private void overrideRunConfigs()
    {
        // run tasks

        JavaExec exec = (JavaExec) project.getTasks().getByName("runClient");
        {
            exec.setMain(getClientRunClass());
            exec.setArgs(getClientRunArgs());
        }

        exec = (JavaExec) project.getTasks().getByName("runServer");
        {
            exec.setMain(getServerRunClass());
            exec.setArgs(getServerRunArgs());
        }

        exec = (JavaExec) project.getTasks().getByName("debugClient");
        {
            exec.setMain(getClientRunClass());
            exec.setArgs(getClientRunArgs());
        }

        exec = (JavaExec) project.getTasks().getByName("debugServer");
        {
            exec.setMain(getServerRunClass());
            exec.setArgs(getServerRunArgs());
        }

        // idea run configs

        IdeaModel ideaConv = (IdeaModel) project.getExtensions().getByName("idea");
View Full Code Here


        }
    }
   
    private final void createExecTasks()
    {
        JavaExec exec = makeTask("runClient", JavaExec.class);
        {
            exec.setMain(getClientRunClass());
            exec.jvmArgs("-Xincgc", "-Xmx1024M", "-Xms1024M", "-Dfml.ignoreInvalidMinecraftCertificates=true");
            exec.args(getClientRunArgs());
            exec.workingDir(delayedFile("{ASSET_DIR}/.."));
            exec.setStandardOutput(System.out);
            exec.setErrorOutput(System.err);

            exec.setGroup("ForgeGradle");
            exec.setDescription("Runs the Minecraft client");
        }

        exec = makeTask("runServer", JavaExec.class);
        {
            exec.setMain(getServerRunClass());
            exec.jvmArgs("-Xincgc", "-Dfml.ignoreInvalidMinecraftCertificates=true");
            exec.workingDir(delayedFile("{ASSET_DIR}/.."));
            exec.args(getServerRunArgs());
            exec.setStandardOutput(System.out);
            exec.setStandardInput(System.in);
            exec.setErrorOutput(System.err);

            exec.setGroup("ForgeGradle");
            exec.setDescription("Runs the Minecraft Server");
        }

        exec = makeTask("debugClient", JavaExec.class);
        {
            exec.setMain(getClientRunClass());
            exec.jvmArgs("-Xincgc", "-Xmx1024M", "-Xms1024M", "-Dfml.ignoreInvalidMinecraftCertificates=true");
            exec.args(getClientRunArgs());
            exec.workingDir(delayedFile("{ASSET_DIR}/.."));
            exec.setStandardOutput(System.out);
            exec.setErrorOutput(System.err);
            exec.setDebug(true);

            exec.setGroup("ForgeGradle");
            exec.setDescription("Runs the Minecraft client in debug mode");
        }

        exec = makeTask("debugServer", JavaExec.class);
        {
            exec.setMain(getServerRunClass());
            exec.jvmArgs("-Xincgc", "-Dfml.ignoreInvalidMinecraftCertificates=true");
            exec.workingDir(delayedFile("{ASSET_DIR}/.."));
            exec.args(getServerRunArgs());
            exec.setStandardOutput(System.out);
            exec.setStandardInput(System.in);
            exec.setErrorOutput(System.err);
            exec.setDebug(true);

            exec.setGroup("ForgeGradle");
            exec.setDescription("Runs the Minecraft serevr in debug mode");
        }
    }
View Full Code Here

        }
       
        // Add the mod and stuff to the classpath of the exec tasks.
        final Jar jarTask = (Jar) project.getTasks().getByName("jar");
       
        JavaExec exec = (JavaExec) project.getTasks().getByName("runClient");
        {
            exec.jvmArgs("-Djava.library.path=" + delayedFile(NATIVES_DIR).call().getAbsolutePath());
            exec.classpath(project.getConfigurations().getByName("runtime"));
            exec.classpath(jarTask.getArchivePath());
            exec.dependsOn(jarTask);
        }
       
        exec = (JavaExec) project.getTasks().getByName("runServer");
        {
            exec.classpath(project.getConfigurations().getByName("runtime"));
            exec.classpath(jarTask.getArchivePath());
            exec.dependsOn(jarTask);
        }
       
        exec = (JavaExec) project.getTasks().getByName("debugClient");
        {
            exec.jvmArgs("-Djava.library.path=" + delayedFile(NATIVES_DIR).call().getAbsolutePath());
            exec.classpath(project.getConfigurations().getByName("runtime"));
            exec.classpath(jarTask.getArchivePath());
            exec.dependsOn(jarTask);
        }
       
        exec = (JavaExec) project.getTasks().getByName("debugServer");
        {
            exec.classpath(project.getConfigurations().getByName("runtime"));
            exec.classpath(jarTask.getArchivePath());
            exec.dependsOn(jarTask);
        }
       
        // configure source replacement.
        for (SourceCopyTask t : project.getTasks().withType(SourceCopyTask.class))
        {
View Full Code Here

TOP

Related Classes of org.gradle.api.tasks.JavaExec

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.