Examples of newBuild()


Examples of org.gradle.tooling.ProjectConnection.newBuild()

        ProjectConnection connection = GradleConnector.newConnector().forProjectDirectory(buildFile.getParentFile())
                .connect();

        try {
            BuildLauncher build = connection.newBuild();

            // select tasks to run:
            build.forTasks(taskName);

            List<String> buildArgs = new ArrayList<String>();
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

            ProjectConnection connection = GradleConnector.newConnector()
                    .forProjectDirectory(buildFile.getParentFile()).connect();

            try {
                BuildLauncher build = connection.newBuild();

                // select tasks to run:
                build.forTasks(taskName);

                List<String> buildArgs = new ArrayList<String>();
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

         connector = connector.useGradleUserHomeDir(new File(gradleHome));
      }
     
      ProjectConnection connection = connector.connect();

      BuildLauncher launcher = connection.newBuild().forTasks(task);

      List<String> argList = Lists.newArrayList(arguments);

      if (!Strings.isNullOrEmpty(profile))
      {
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

    public GradleHandle start(File directory, List<String> arguments) {
        GradleConnector connector = GradleConnector.newConnector();
        connector.forProjectDirectory(directory);
        ProjectConnection connection = connector.connect();
        BuildLauncher launcher = connection.newBuild();
        String[] argumentArray = new String[arguments.size()];
        arguments.toArray(argumentArray);
        launcher.withArguments(argumentArray);
        return new BuildLauncherBackedGradleHandle(launcher);
    }
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

        gradleConnector.forProjectDirectory(projectDir);
        ProjectConnection projectConnection = null;
        try {
            projectConnection = gradleConnector.connect();

            BuildLauncher buildLauncher = projectConnection.newBuild();
            List<TemporaryFileRef> initScripts = getAllInitScriptFiles(project);
            try {
                configureBuildLauncher(targetSetup, buildLauncher, taskDef, initScripts);

                TaskOutputDef outputDef = taskDef.getOutputDef();
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

  @Test
  public void defaultJvmArgsArePreservedWhenLoadedAgentIsConfigured()
      throws IOException {
    ProjectConnection project = new ProjectCreator()
        .createProject("spring-loaded-jvm-args");
    project.newBuild()
        .forTasks("bootRun")
        .withArguments("-PbootVersion=" + BOOT_VERSION,
            "-PspringLoadedVersion=" + SPRING_LOADED_VERSION, "--stacktrace")
        .run();
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

  @Test
  public void springLoadedCanBeUsedWithGradle16() throws IOException {
    ProjectConnection project = new ProjectCreator("1.6")
        .createProject("spring-loaded-old-gradle");
    project.newBuild()
        .forTasks("bootRun")
        .withArguments("-PbootVersion=" + BOOT_VERSION,
            "-PspringLoadedVersion=" + SPRING_LOADED_VERSION, "--stacktrace")
        .run();
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

  @Test
  public void repackageWithTransitiveFileDependency() throws Exception {
    ProjectConnection project = new ProjectCreator()
        .createProject("multi-project-transitive-file-dependency");
    project.newBuild().forTasks("clean", "build")
        .withArguments("-PbootVersion=" + BOOT_VERSION).run();
    File buildLibs = new File(
        "target/multi-project-transitive-file-dependency/main/build/libs");
    JarFile jarFile = new JarFile(new File(buildLibs, "main.jar"));
    assertThat(jarFile.getEntry("lib/commons-logging-1.1.3.jar"), notNullValue());
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

  @Test
  public void repackageWithCommonFileDependency() throws Exception {
    ProjectConnection project = new ProjectCreator()
        .createProject("multi-project-common-file-dependency");
    project.newBuild().forTasks("clean", "build")
        .withArguments("-PbootVersion=" + BOOT_VERSION).run();
    File buildLibs = new File(
        "target/multi-project-common-file-dependency/build/libs");
    JarFile jarFile = new JarFile(new File(buildLibs,
        "multi-project-common-file-dependency.jar"));
View Full Code Here

Examples of org.gradle.tooling.ProjectConnection.newBuild()

        ProjectConnection connection = GradleConnector.newConnector().forProjectDirectory(buildFile.getParentFile())
                .connect();

        try {
            BuildLauncher build = connection.newBuild();

            // select tasks to run:
            build.forTasks(taskName);

            List<String> buildArgs = new ArrayList<String>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.