Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for withBuildscript (0.28 sec)

  1. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/KotlinBuildScriptIntegrationTest.kt

            withBuildScript(
                """
                @Suppress("DSL_SCOPE_VIOLATION")
                plugins {
                    id("base")
                }
                """
            )
    
            build("clean")
        }
    
        @Test
        fun `non top-level use of the plugins block fails with reasonable error message`() {
    
            withBuildScript(
                """
                plugins {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jan 29 11:39:00 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/GradleKotlinDslIntegrationTest.kt

                """
            )
    
            withBuildScript(
                """
                apply(from = "gradle/script.gradle.kts")
                """
            )
    
            assertThat(
                build("-q", "ok").output.trim(),
                equalTo("ok!")
            )
        }
    
        @Test
        fun `can run a simple task`() {
            withBuildScript(
                """
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 18:26:28 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/LocationAwareScriptEvaluationIntegrationTest.kt

            val script = withBuildScript("buildscript { $boom }")
    
            assertFailingBuildOutputOf("help") {
                """
                * Where:
                Build file '${script.canonicalPath}' line: 1
                """
            }
        }
    
        @Test
        fun `location of exception thrown from plugins block is reported`() {
    
            val script = withBuildScript("plugins { $boom }")
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  4. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/ProjectSchemaLambdaAccessorsIntegrationTest.kt

                        name.toUpperCase()
                    })
                    """.trimIndent(),
                    "my"
                )
                generateForBuildSrc()
            }
    
            withBuildScript(
                """
                plugins {
                    my
                }
    
                inline fun <reified T> typeOf(value: T) = typeOf<T>()
    
                println("closureExtension: " + typeOf(closureExtension))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Sep 24 17:45:43 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  5. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/GradleKotlinDslRegressionsTest.kt

    class GradleKotlinDslRegressionsTest : AbstractKotlinIntegrationTest() {
    
        @Test
        @Issue("https://github.com/gradle/gradle/issues/9919")
        fun `gradleKotlinDsl dependency declaration does not throw`() {
    
            withBuildScript(
                """
                plugins { java }
                dependencies {
                    compileOnly(gradleKotlinDsl())
                }
                """
            )
    
            build("help")
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 07:57:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/support/EmbeddedKotlinProviderTest.kt

            assertThat(result.output, containsString("No dependencies"))
        }
    
        @Test
        fun `embedded kotlin dependencies are pinned to the embedded version`() {
    
            withBuildScript(
                """
                buildscript {
                    $repositoriesBlock
                    dependencies {
                        classpath("org.jetbrains.kotlin:kotlin-stdlib:1.0")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jan 29 11:39:00 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/support/ImplicitImportsTest.kt

        @Test
        fun `implicit imports are fully qualified to allow use of the preferred type amongst those with same simple name in different Gradle API packages`() {
    
            // given:
            withBuildScript(
                """
    
                println("*" + Jar::class.qualifiedName + "*")
    
                """
            )
    
            // when:
            val result = build("help")
    
            // then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Sep 24 17:45:42 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/ProjectSchemaAccessorsIntegrationTest.kt

                    myBaseTask {
                        doLast {
                            println("*my base*")
                        }
                    }
                }
                """
            )
    
            withBuildScript(
                """
                plugins {
                    base
                }
    
                tasks {
                    wrapper {
                        gradleVersion = "5.0"
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jan 29 11:39:00 UTC 2024
    - 39.6K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/resolver/KotlinScriptDependenciesResolverTest.kt

            )
        }
    
        @Test
        @Requires(IntegTestPreconditions.NotEmbeddedExecutor::class)
        fun `succeeds on precompiled project script`() {
    
            withKotlinBuildSrc()
    
            withBuildScript(
                """
                plugins {
                    id("my-plugin")
                }
                """
            )
    
            assertSucceedsForScriptWithReceiver(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 05:12:50 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  10. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/embedded/EmbeddedKotlinPluginIntegTest.kt

    import org.hamcrest.MatcherAssert.assertThat
    import org.junit.Test
    
    
    class EmbeddedKotlinPluginIntegTest : AbstractKotlinIntegrationTest() {
    
        @Test
        fun `applies the kotlin plugin`() {
    
            withBuildScript(
                """
    
                plugins {
                    `embedded-kotlin`
                }
    
                $repositoriesBlock
    
                """
            )
    
            val result = build("assemble")
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Apr 06 02:21:33 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top