Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 44 for withPluginClasspath (1 sec)

  1. platforms/documentation/docs/src/snippets/developingPlugins/testingPlugins/kotlin/url-verifier-plugin/src/functionalTest/groovy/org/myorg/UrlVerifierPluginFunctionalTest.groovy

                }
            """
    
            when:
            def result = GradleRunner.create()
                .withProjectDir(testProjectDir)
                .withArguments('verifyUrl')
                .withPluginClasspath()
                .build()
    
            then:
            result.output.contains("Successfully resolved URL 'https://www.google.com/'")
            result.task(":verifyUrl").outcome == SUCCESS
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1K bytes
    - Viewed (0)
  2. platforms/software/build-init/src/main/resources/org/gradle/buildinit/tasks/templates/plugin/groovy/spock/PluginFunctionalTest.groovy.template

            settingsFile << ""
            buildFile << """
    plugins {
        id('${pluginId.value}')
    }
    """
    
            when:
            def runner = GradleRunner.create()
            runner.forwardOutput()
            runner.withPluginClasspath()
            runner.withArguments("greeting")
            runner.withProjectDir(projectDir)
            def result = runner.build()
    
            then:
            result.output.contains("Hello from plugin '${pluginId.value}'")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 26 19:39:09 UTC 2023
    - 979 bytes
    - Viewed (0)
  3. platforms/documentation/docs/src/docs/userguide/authoring-builds/other/test_kit.adoc

    Furthermore, it automatically generates the classpath for the code under test and injects it via link:{javadocPath}/org/gradle/testkit/runner/GradleRunner.html#withPluginClasspath--[GradleRunner.withPluginClasspath()] for any `GradleRunner` instance created by the user.
    It's important to note that the mechanism currently _only_ works if the plugin under test is applied using the <<plugins.adoc#sec:plugins_block,plugins DSL>>.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 23 05:36:09 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/samples/templates/gradle-plugin-in-java/src/functionalTest/java/com/example/plugin/GreetingPluginFunctionalTest.java

                    "  id('com.example.plugin.greeting')" +
                    "}");
    
            // Run the build
            BuildResult result = GradleRunner.create()
                .forwardOutput()
                .withPluginClasspath()
                .withArguments("greet")
                .withProjectDir(projectDir)
                .build();
    
            // Verify the result
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  5. testing/smoke-test/src/smokeTest/groovy/org/gradle/smoketests/SmokeTestGradleRunner.groovy

        }
    
        @Override
        SmokeTestGradleRunner withPluginClasspath() throws InvalidPluginMetadataException {
            delegate.withPluginClasspath()
            return this
        }
    
        @Override
        SmokeTestGradleRunner withPluginClasspath(Iterable<? extends File> classpath) {
            delegate.withPluginClasspath(classpath)
            return this
        }
    
        @Override
        boolean isDebug() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. platforms/documentation/docs/src/snippets/testKit/automaticClasspathInjectionCustomTestSourceSet/kotlin/src/functionalTest/groovy/org/gradle/sample/BuildLogicFunctionalTest.groovy

                }
            """
    
            when:
            def result = GradleRunner.create()
                .withProjectDir(testProjectDir)
                .withArguments('helloWorld')
                .withPluginClasspath()
                .build()
    
            then:
            result.output.contains('Hello world!')
            result.task(":helloWorld").outcome == SUCCESS
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1K bytes
    - Viewed (0)
  7. platforms/extensibility/test-kit/src/integTest/groovy/org/gradle/testkit/runner/GradleRunnerUnsupportedFeatureFailureIntegrationTest.groovy

            given:
            buildScript plugin.useDeclaration
    
            when:
            runner('helloWorld')
                .withGradleVersion(maxUnsupportedVersion)
                .withPluginClasspath([file("foo")])
                .build()
    
            then:
            def e = thrown UnsupportedFeatureException
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/snippets/testKit/testKitFunctionalTestSpockBuildCache/groovy/src/test/groovy/org/gradle/sample/BuildLogicFunctionalTest.groovy

        }
        // end::functional-test-build-cache[]
    
        def runner() {
            return GradleRunner.create()
                .withProjectDir(testProjectDir)
                .withPluginClasspath()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. platforms/documentation/docs/src/snippets/configurationCache/testKit/kotlin/src/test/kotlin/org/example/BuildLogicFunctionalTest.kt

        }
        // end::functional-test-configuration-cache[]
    
        private
        fun runner() =
            GradleRunner.create()
                .withProjectDir(testProjectDir.root)
                .withPluginClasspath()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/testKit/automaticClasspathInjectionQuickstart/kotlin/src/test/groovy/org/gradle/sample/BuildLogicFunctionalTest.groovy

                }
            """
    
            when:
            def result = GradleRunner.create()
                .withProjectDir(testProjectDir)
                .withArguments('helloWorld')
                .withPluginClasspath()
                .build()
    
            then:
            result.output.contains('Hello world!')
            result.task(":helloWorld").outcome == SUCCESS
        }
        // end::functional-test-classpath-setup-automatic[]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top