Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 76 for GradleRunner (0.3 sec)

  1. platforms/extensibility/test-kit/src/main/java/org/gradle/testkit/runner/GradleRunner.java

         * @return this
         * @see #getArguments()
         */
        public abstract GradleRunner withArguments(List<String> arguments);
    
        /**
         * Sets the build arguments.
         *
         * @param arguments the build arguments
         * @return this
         * @see #getArguments()
         */
        public abstract GradleRunner withArguments(String... arguments);
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  2. platforms/documentation/docs/src/docs/userguide/authoring-builds/other/test_kit.adoc

    The following demonstrates the usage of the Gradle runner in a Java JUnit test:
    
    === Example: Using GradleRunner with Java and JUnit
    
    [source,java,indent=0]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 23 05:36:09 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  3. platforms/extensibility/test-kit/src/main/java/org/gradle/testkit/runner/internal/GradleProvider.java

            @Override
            public void applyTo(GradleConnector gradleConnector) {
                gradleConnector.useInstallation(gradleHome);
            }
    
            @Override
            public void applyTo(GradleRunner gradleRunner) {
                gradleRunner.withGradleInstallation(gradleHome);
            }
        }
    
        private static final class UriGradleProvider extends GradleProvider {
            private final URI uri;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  4. platforms/extensibility/test-kit/src/integTest/groovy/org/gradle/testkit/runner/enduser/GradleRunnerMiscEndUserIntegrationTest.groovy

                }
            """
    
            groovyTestSourceFile("""
                import org.gradle.testkit.runner.GradleRunner
                import spock.lang.Specification
    
                class Test extends Specification {
                    def "create GradleRunner"() {
                        expect:
                        GradleRunner.create().withProjectDir(new File("foo")).build()
                    }
                }
            """)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jun 10 14:28:48 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/samples/build-organization/publishing-convention-plugins/groovy/convention-plugins/src/test/groovy/com/myorg/PluginTest.groovy

        def runTask(String task) {
            return GradleRunner.create()
                    .withProjectDir(testProjectDir)
                    .withArguments(task, '--stacktrace')
                    .withPluginClasspath()
                    .build()
        }
    
        def runTaskWithFailure(String task) {
            return GradleRunner.create()
                    .withProjectDir(testProjectDir)
                    .withArguments(task, '--stacktrace')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 947 bytes
    - Viewed (0)
  6. platforms/extensibility/test-kit/src/main/java/org/gradle/testkit/runner/internal/DefaultGradleRunner.java

            return testKitDirProvider;
        }
    
        @Override
        public GradleRunner withGradleVersion(String versionNumber) {
            this.gradleProvider = GradleProvider.version(versionNumber);
            return this;
        }
    
        @Override
        public GradleRunner withGradleInstallation(File installation) {
            this.gradleProvider = GradleProvider.installation(installation);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Mar 20 10:14:55 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/samples/incubating/build-organization/publishing-convention-plugins/groovy/convention-plugins/src/test/groovy/com/myorg/PluginTest.groovy

        def runTask(String task) {
            return GradleRunner.create()
                    .withProjectDir(testProjectDir)
                    .withArguments(task, '--stacktrace')
                    .withPluginClasspath()
                    .build()
        }
    
        def runTaskWithFailure(String task) {
            return GradleRunner.create()
                    .withProjectDir(testProjectDir)
                    .withArguments(task, '--stacktrace')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 947 bytes
    - Viewed (0)
  8. platforms/extensibility/test-kit/src/integTest/groovy/org/gradle/testkit/runner/enduser/GradleRunnerPluginClasspathInjectionEndUserIntegrationTest.groovy

        }
    
        def "can test plugin and custom task as external files by providing them as classpath through GradleRunner API"() {
            when:
            file("src/test/groovy/Test.groovy") << """
                import org.gradle.testkit.runner.GradleRunner
                import static org.gradle.testkit.runner.TaskOutcome.*
                import spock.lang.Specification
                import spock.lang.TempDir
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  9. platforms/software/build-init/src/main/resources/org/gradle/buildinit/tasks/templates/plugin/java/junit/PluginFunctionalTest.java.template

            writeString(getSettingsFile(), "");
            writeString(getBuildFile(),
                "plugins {" +
                "  id('${pluginId.value}')" +
                "}");
    
            // Run the build
            GradleRunner runner = GradleRunner.create();
            runner.forwardOutput();
            runner.withPluginClasspath();
            runner.withArguments("greeting");
            runner.withProjectDir(projectDir);
            BuildResult result = runner.build();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 26 19:39:09 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. platforms/extensibility/plugin-development/src/integTest/groovy/org/gradle/plugin/devel/impldeps/BaseGradleImplDepsTestCodeIntegrationTest.groovy

            package org.acme;
            import org.gradle.testkit.runner.GradleRunner;
            import org.junit.Test;
            import static org.junit.Assert.assertTrue;
    
            public abstract class BaseTestPluginTest {
                GradleRunner runner() {
                    return GradleRunner.create();
                }
    
                @Test
                void commonTest() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top