This repository was archived by the owner on Dec 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
main/kotlin/org/gradle/kotlin/dsl/plugins/dsl
test/kotlin/org/gradle/kotlin/dsl/plugins/dsl Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import org.gradle.kotlin.dsl.plugins.embedded.EmbeddedKotlinPlugin
2626 * The `kotlin-dsl` plugin.
2727 *
2828 * - Applies the `embedded-kotlin` plugin
29- * - Adds the `gradleKotlinDsl()` dependency to the `compileOnly` and `testRuntimeOnly ` configurations
29+ * - Adds the `gradleKotlinDsl()` dependency to the `compileOnly` and `testImplementation ` configurations
3030 * - Configures the Kotlin DSL compiler plugins
3131 *
3232 * @see org.gradle.kotlin.dsl.plugins.embedded.EmbeddedKotlinPlugin
@@ -38,7 +38,7 @@ open class KotlinDslPlugin : Plugin<Project> {
3838
3939 applyEmbeddedKotlinPlugin()
4040 applyKotlinDslCompilerPlugins()
41- addGradleKotlinDslDependencyTo(" compileOnly" , " testRuntimeOnly " )
41+ addGradleKotlinDslDependencyTo(" compileOnly" , " testImplementation " )
4242 }
4343 }
4444
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class KotlinDslPluginTest : AbstractPluginTest() {
4444 }
4545
4646 @Test
47- fun `gradle kotlin dsl api is available at test runtime ` () {
47+ fun `gradle kotlin dsl api is available for test implementation ` () {
4848 withBuildScript("""
4949
5050 plugins {
@@ -81,16 +81,17 @@ class KotlinDslPluginTest : AbstractPluginTest() {
8181
8282 import org.gradle.testfixtures.ProjectBuilder
8383 import org.junit.Test
84+ import org.gradle.kotlin.dsl.*
8485
8586 class MyTest {
8687
8788 @Test
8889 fun `my test`() {
89- val project = ProjectBuilder.builder().build()
90- project.plugins.apply(MyPlugin::class.java)
90+ ProjectBuilder.builder().build().run {
91+ apply<MyPlugin>()
92+ }
9193 }
9294 }
93-
9495 """ )
9596
9697 assertThat(
You can’t perform that action at this time.
0 commit comments