Repository: gradle/gradle
Pull request #32925: Address deprecations in DefaultPrecompiledScriptPluginsSupport
Author: login: jbartok
Labels: name: in:kotlin-dsl
Created: 2025-04-02T06:56:00Z | Merged: 2025-04-07T05:30:41Z

<!--- The issue this PR addresses -->
<!-- Fixes #? -->

### Context
<!--- Why do you believe many users will benefit from this change? -->
<!--- Link to relevant issues or forum discussions here -->

### Contributor Checklist
- [ ] [Review Contribution Guidelines](https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md).
- [ ] Make sure that all commits are [signed off](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).
- [ ] Make sure all contributed code can be distributed under the terms of the [Apache License 2.0](https://github.com/gradle/gradle/blob/master/LICENSE), e.g. the code was written by yourself or the original code is licensed under [a license compatible to Apache License 2.0](https://apache.org/legal/resolved.html).
- [ ] Check ["Allow edit from maintainers" option](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) in pull request so that additional changes can be pushed by Gradle team.
- [ ] Provide integration tests (under `<subproject>/src/integTest`) to verify changes from a user perspective.
- [ ] Provide unit tests (under `<subproject>/src/test`) to verify logic.
- [ ] Update User Guide, DSL Reference, and Javadoc for public-facing changes.
- [ ] Ensure that tests pass sanity check: `./gradlew sanityCheck`.
- [ ] Ensure that tests pass locally: `./gradlew <changed-subproject>:quickTest`.

### Reviewing cheatsheet

Before merging the PR, comments starting with 
- ❌ ❓**must** be fixed
- 🤔 💅 **should** be fixed
- 💭 **may** be fixed
- 🎉 celebrate happy things



Diff:
diff --git a/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslPluginCrossVersionSmokeTest.kt b/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslPluginCrossVersionSmokeTest.kt
index f86bdda0efe69..28c4c9bd05a9f 100644
--- a/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslPluginCrossVersionSmokeTest.kt
+++ b/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslPluginCrossVersionSmokeTest.kt
@@ -20,7 +20,7 @@ import org.gradle.integtests.fixtures.versions.KotlinGradlePluginVersions
 import org.gradle.kotlin.dsl.fixtures.AbstractKotlinIntegrationTest
 import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion
 import org.gradle.test.precondition.Requires
-import org.gradle.test.preconditions.IntegTestPreconditions
+import org.gradle.test.preconditions.IntegTestPreconditions.NotEmbeddedExecutor
 import org.hamcrest.CoreMatchers.containsString
 import org.hamcrest.MatcherAssert.assertThat
 import org.junit.Test
@@ -29,6 +29,7 @@ import org.junit.Test
 /**
  * Assert that the cross-version protocol between `:kotlin-dsl-plugins` and `:kotlin-dsl-provider-plugins` is not broken.
  */
+@Suppress("FunctionName")
 class KotlinDslPluginCrossVersionSmokeTest : AbstractKotlinIntegrationTest() {
 
     override val forceLocallyBuiltKotlinDslPlugins = false
@@ -36,7 +37,7 @@ class KotlinDslPluginCrossVersionSmokeTest : AbstractKotlinIntegrationTest() {
     private val oldestSupportedKotlinDslPluginVersion = "4.1.3"
 
     @Test
-    @Requires(IntegTestPreconditions.NotEmbeddedExecutor::class)
+    @Requires(NotEmbeddedExecutor::class)
     fun `can run with oldest supported version of kotlin-dsl plugin`() {
 
         withDefaultSettingsIn("buildSrc")
@@ -58,7 +59,9 @@ class KotlinDslPluginCrossVersionSmokeTest : AbstractKotlinIntegrationTest() {
 
             assertThat(
                 output,
-                containsString("This version of Gradle expects version '$expectedKotlinDslPluginsVersion' of the `kotlin-dsl` plugin but version '$oldestSupportedKotlinDslPluginVersion' has been applied to project ':buildSrc'. Let Gradle control the version of `kotlin-dsl` by removing any explicit `kotlin-dsl` version constraints from your build logic.")
+                containsString("This version of Gradle expects version '$expectedKotlinDslPluginsVersion' of the `kotlin-dsl` plugin " +
+                    "but version '$oldestSupportedKotlinDslPluginVersion' has been applied to project ':buildSrc'. " +
+                    "Let Gradle control the version of `kotlin-dsl` by removing any explicit `kotlin-dsl` version constraints from your build logic.")
             )
 
             assertThat(
@@ -69,20 +72,14 @@ class KotlinDslPluginCrossVersionSmokeTest : AbstractKotlinIntegrationTest() {
     }
 
     @Test
-    @Requires(
-        IntegTestPreconditions.NotEmbeddedExecutor::class,
-        reason = "Kotlin version leaks on the classpath when running embedded"
-    )
+    @Requires(NotEmbeddedExecutor::class, reason = "Kotlin version leaks on the classpath when running embedded")
     fun `can build plugin for oldest supported Kotlin language version using last published plugin`() {
 
         `can build plugin for oldest supported Kotlin language version`()
     }
 
     @Test
-    @Requires(
-        IntegTestPreconditions.NotEmbeddedExecutor::class,
-        reason = "Kotlin version leaks on the classpath when running embedded"
-    )
+    @Requires(NotEmbeddedExecutor::class, reason = "Kotlin version leaks on the classpath when running embedded")
     fun `can build plugin for oldest supported Kotlin language version using locally built plugin`() {
 
         doForceLocallyBuiltKotlinDslPlugins()
@@ -121,10 +118,7 @@ class KotlinDslPluginCrossVersionSmokeTest : AbstractKotlinIntegrationTest() {
     }
 
     @Test
-    @Requires(
-        IntegTestPreconditions.NotEmbeddedExecutor::class,
-        reason = "Kotlin version leaks on the classpath when running embedded"
-    )
+    @Requires(NotEmbeddedExecutor::class, reason = "Kotlin version leaks on the classpath when running embedded")
     fun `can build plugin for previous unsupported Kotlin language version`() {
 
         val previousKotlinLanguageVersion = "1.4"
diff --git a/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/precompiled/PrecompiledScriptPluginAccessorsTest.kt b/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/precompiled/PrecompiledScriptPluginAccessorsTest.kt
index 7a4ecb2958a79..460098fd60a29 100644
--- a/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/precompiled/PrecompiledScriptPluginAccessorsTest.kt
+++ b/platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/plugins/precompiled/PrecompiledScriptPluginAccessorsTest.kt
@@ -694,7 +694,7 @@ class PrecompiledScriptPluginAccessorsTest : AbstractPrecompiledScriptPluginTest
     }
 
     @Test
-    fun `plugin application errors fail the build by default`() {
+    fun `plugin application errors fail the build`() {
 
         val pluginId = "invalid.plugin"
         val pluginJar = jarWithInvalidPlugin(pluginId, "InvalidPlugin")
@@ -711,51 +711,6 @@ class PrecompiledScriptPluginAccessorsTest : AbstractPrecompiledScriptPluginTest
             .withStackTraceChecksDisabled()
             .runWithFailure()
             .assertions()
-
-        executer.beforeExecute {
-            it.expectDeprecationWarning(
-                "The org.gradle.kotlin.dsl.precompiled.accessors.strict system property has been deprecated. " +
-                    "This is scheduled to be removed in Gradle 9.0. " +
-                    "Consult the upgrading guide for further information: https://docs.gradle.org/${GradleVersion.current().version}/userguide/upgrading_version_7.html#strict-kotlin-dsl-precompiled-scripts-accessors-by-default"
-            )
-        }
-
-        gradleExecuterFor(arrayOf("--rerun-tasks", "classes", "-Dorg.gradle.kotlin.dsl.precompiled.accessors.strict="))
-            .withStackTraceChecksDisabled()
-            .runWithFailure()
-            .assertions()
-
-        gradleExecuterFor(arrayOf("--rerun-tasks", "classes", "-Dorg.gradle.kotlin.dsl.precompiled.accessors.strict=true"))
-            .withStackTraceChecksDisabled()
-            .runWithFailure()
-            .assertions()
-    }
-
-    @Test
-    fun `plugin application errors can be ignored but are reported`() {
-
-        val pluginId = "invalid.plugin"
-        val pluginJar = jarWithInvalidPlugin(pluginId, "InvalidPlugin")
-
-        withPrecompiledScriptApplying(pluginId, pluginJar)
-
-        executer.beforeExecute {
-            it.expectDeprecationWarning(
-                "The org.gradle.kotlin.dsl.precompiled.accessors.strict system property has been deprecated. " +
-                    "This is scheduled to be removed in Gradle 9.0. " +
-                    "Consult the upgrading guide for further information: https://docs.gradle.org/${GradleVersion.current().version}/userguide/upgrading_version_7.html#strict-kotlin-dsl-precompiled-scripts-accessors-by-default"
-            )
-        }
-
-        val assertions: ExecutionResult.() -> Unit = {
-            assertOutputContains("An exception occurred applying plugin request [id: '$pluginId']")
-            assertOutputContains("'InvalidPlugin' is neither a plugin or a rule source and cannot be applied.")
-        }
-
-        gradleExecuterFor(arrayOf("--rerun-tasks", "classes", "-Dorg.gradle.kotlin.dsl.precompiled.accessors.strict=false"))
-            .withStackTraceChecksDisabled()
-            .run()
-            .assertions()
     }
 
     private
diff --git a/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/DefaultPrecompiledScriptPluginsSupport.kt b/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/DefaultPrecompiledScriptPluginsSupport.kt
index 703a7c508e1a9..1b28d022d4296 100644
--- a/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/DefaultPrecompiledScriptPluginsSupport.kt
+++ b/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/DefaultPrecompiledScriptPluginsSupport.kt
@@ -19,7 +19,6 @@ package org.gradle.kotlin.dsl.provider.plugins.precompiled
 import org.gradle.api.InvalidUserCodeException
 import org.gradle.api.Project
 import org.gradle.api.Task
-import org.gradle.api.Transformer
 import org.gradle.api.file.Directory
 import org.gradle.api.file.DirectoryProperty
 import org.gradle.api.file.FileCollection
@@ -37,7 +36,6 @@ import org.gradle.api.tasks.SourceSet
 import org.gradle.api.tasks.SourceSetContainer
 import org.gradle.api.tasks.TaskContainer
 import org.gradle.api.tasks.TaskProvider
-import org.gradle.internal.deprecation.DeprecationLogger
 import org.gradle.internal.deprecation.Documentation
 import org.gradle.internal.fingerprint.classpath.ClasspathFingerprinter
 import org.gradle.jvm.toolchain.JavaToolchainService
@@ -55,7 +53,6 @@ import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.GenerateExternal
 import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.GeneratePrecompiledScriptPluginAccessors
 import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.GenerateScriptPluginAdapters
 import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.HashedProjectSchema
-import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.STRICT_MODE_SYSTEM_PROPERTY_NAME
 import org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.resolverEnvironmentStringFor
 import org.gradle.kotlin.dsl.support.ImplicitImports
 import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion
@@ -232,13 +229,6 @@ fun Project.enableScriptCompilationOf(
                 sourceCodeOutputDir.set(it)
                 metadataOutputDir.set(accessorsMetadata)
                 compiledPluginsBlocksDir.set(compiledPluginsBlocks)
-                @Suppress("DEPRECATION")
-                strict.set(
-                    providers
-                        .systemProperty(STRICT_MODE_SYSTEM_PROPERTY_NAME)
-                        .map(strictModeSystemPropertyNameMapper)
-                        .orElse(true)
-                )
                 plugins.value(scriptPlugins)
             }
 
@@ -332,17 +322,6 @@ private fun Project.registerCompilePluginsBlocksTask(
     }
 
 
-private
-val strictModeSystemPropertyNameMapper: Transformer<Boolean, String> = Transformer { prop ->
-    DeprecationLogger.deprecateSystemProperty(STRICT_MODE_SYSTEM_PROPERTY_NAME)
-        .willBeRemovedInGradle9()
-        .withUpgradeGuideSection(7, "strict-kotlin-dsl-precompiled-scripts-accessors-by-default")
-        .nagUser()
-    if (prop.isBlank()) true
-    else java.lang.Boolean.parseBoolean(prop)
-}
-
-
 private
 fun configureKotlinCompilerArguments(
     objects: ObjectFactory,
@@ -376,9 +355,7 @@ fun configureKotlinCompilerArguments(
                     validateKotlinCompilerArguments()
                 }
             } else {
-                doFirst {
-                    configureKotlinCompilerArgumentsEagerly(resolverEnvironment)
-                }
+                configureKotlinCompilerArgumentsEagerly()
             }
         }
     }
@@ -424,23 +401,12 @@ fun Task.validateKotlinCompilerArguments() {
 
 
 private
-fun Task.configureKotlinCompilerArgumentsEagerly(resolverEnvironment: Provider<String>) {
-    DeprecationLogger.deprecateBehaviour("Using the `kotlin-dsl` plugin together with Kotlin Gradle Plugin < 1.8.0.")
-        .withAdvice(
-            "Please let Gradle control the version of `kotlin-dsl` by removing any explicit `kotlin-dsl` version constraints from your build logic. " +
-                "Or use version $expectedKotlinDslPluginsVersion which is the expected version for this Gradle release. " +
-                "If you explicitly declare which version of the Kotlin Gradle Plugin to use for your build logic, update it to >= 1.8.0."
-        )
-        .willBecomeAnErrorInGradle9()
-        .withUpgradeGuideSection(8, "kotlin_dsl_with_kgp_lt_1_8_0")
-        .nagUser()
-    withGroovyBuilder {
-        getProperty("kotlinOptions").withGroovyBuilder {
-            @Suppress("unchecked_cast")
-            val freeCompilerArgs: List<String> = getProperty("freeCompilerArgs") as List<String>
-            setProperty("freeCompilerArgs", freeCompilerArgs + scriptTemplatesArgs + resolverEnvironment.mappedToScriptResolverEnvironmentArg.get())
-        }
-    }
+fun configureKotlinCompilerArgumentsEagerly() {
+    throw PrecompiledScriptException("Using the `kotlin-dsl` plugin together with Kotlin Gradle Plugin < 1.8.0. " +
+        "Please let Gradle control the version of `kotlin-dsl` by removing any explicit `kotlin-dsl` version constraints from your build logic. " +
+        "Or use version $expectedKotlinDslPluginsVersion which is the expected version for this Gradle release. " +
+        "If you explicitly declare which version of the Kotlin Gradle Plugin to use for your build logic, update it to >= 1.8.0."
+    )
 }
 
 
diff --git a/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt b/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt
index e7448779e388e..7ce70a3c97d33 100644
--- a/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt
+++ b/platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt
@@ -41,7 +41,6 @@ import org.gradle.api.provider.Provider
 import org.gradle.api.tasks.CacheableTask
 import org.gradle.api.tasks.Classpath
 import org.gradle.api.tasks.IgnoreEmptyDirectories
-import org.gradle.api.tasks.Input
 import org.gradle.api.tasks.InputDirectory
 import org.gradle.api.tasks.InputFiles
 import org.gradle.api.tasks.Internal
@@ -92,10 +91,6 @@ import java.nio.file.Files
 import javax.inject.Inject
 
 
-internal
-const val STRICT_MODE_SYSTEM_PROPERTY_NAME = "org.gradle.kotlin.dsl.precompiled.accessors.strict"
-
-
 @CacheableTask
 abstract class GeneratePrecompiledScriptPluginAccessors @Inject internal constructor(
 
@@ -148,19 +143,6 @@ abstract class GeneratePrecompiledScriptPluginAccessors @Inject internal constru
     val scriptFiles: Provider<Set<File>>
         get() = scriptPluginFilesOf(plugins)
 
-    @get:Input
-    @Deprecated("Will be removed in Gradle 9.0")
-    abstract val strict: Property<Boolean>
-
-    init {
-        outputs.doNotCacheIf(
-            "Generated accessors can only be cached in strict mode."
-        ) {
-            @Suppress("DEPRECATION")
-            !strict.get()
-        }
-    }
-
     /**
      *  ## Computation and sharing of type-safe accessors
      * 1. Group precompiled script plugins by the list of plugins applied in their `plugins` block.
@@ -493,9 +475,7 @@ abstract class GeneratePrecompiledScriptPluginAccessors @Inject internal constru
 
     private
     fun reportProjectSchemaError(plugins: List<PrecompiledScriptPlugin>, stdout: String, stderr: String, error: Throwable) {
-        @Suppress("DEPRECATION")
-        if (strict.get()) throw PrecompiledScriptException(failedToGenerateAccessorsFor(plugins, stdout, stderr), error)
-        else logger.warn(failedToGenerateAccessorsFor(plugins, stdout, stderr), error)
+        throw PrecompiledScriptException(failedToGenerateAccessorsFor(plugins, stdout, stderr), error)
     }
 
     private
diff --git a/platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc b/platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
index e2f71bfefd512..8817485796671 100644
--- a/platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
+++ b/platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
@@ -201,6 +201,12 @@ In previous versions of Gradle, special handling would apply when the `ear`, `wa
 ==== The Ear and War plugins may add additional artifacts to the archives configuration
 In previous versions of Gradle, special handling would apply when the `ear`, `war` and `java` plugins were applied to a project in any combination. For example, if the `ear` plugin was applied, the war and jar artifacts would not be included in the `archives` configuration.  Similarly, if the `war` plugin were applied, the jar artifact would not be included in the `archives` configuration.  This special handling has been removed in Gradle 9.0.  This means that the artifacts for all plugins applied will be included in the `archives` configuration.  For example, if the `ear`, `war`, and `jar` plugins are applied to a project, the ear, war and jar artifacts will all be included in the `archives` configuration.
 
+==== `kotlinDslPluginOptions.jvmTarget` has been removed
+
+The `kotlinDslPluginOptions.jvmTarget` property, which was previously used to configure the JVM target for code compiled with the `kotlin-dsl` plugin, has been removed in Gradle 9.0.
+
+To set the target JVM version going forward, you should <<kotlin_dsl#sec:kotlin-dsl_plugin,configure a Java Toolchain>> instead.
+
 [[changes_8.14]]
 == Upgrading from 8.13 and earlier
 


Reviews:
user: login: eskatos
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-04T13:36:31Z
user: login: lkasso
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-04T18:11:33Z

Review comments:
diff_hunk: @@ -201,6 +201,13 @@ In previous versions of Gradle, special handling would apply when the `ear`, `wa
 ==== The Ear and War plugins may add additional artifacts to the archives configuration
 In previous versions of Gradle, special handling would apply when the `ear`, `war` and `java` plugins were applied to a project in any combination. For example, if the `ear` plugin was applied, the war and jar artifacts would not be included in the `archives` configuration.  Similarly, if the `war` plugin were applied, the jar artifact would not be included in the `archives` configuration.  This special handling has been removed in Gradle 9.0.  This means that the artifacts for all plugins applied will be included in the `archives` configuration.  For example, if the `ear`, `war`, and `jar` plugins are applied to a project, the ear, war and jar artifacts will all be included in the `archives` configuration.
 
+==== `kotlinDslPluginOptions.jvmTarget` has been removed
+
+Previously, you could use `kotlinDslPluginOptions.jvmTarget` to configure which JVM target should be used for compiling code when using the `kotlin-dsl` plugin.
path: platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
user: login: lkasso
body: ```suggestion
The `kotlinDslPluginOptions.jvmTarget` property, which was previously used to configure the JVM target for code compiled with the `kotlin-dsl` plugin, has been removed in Gradle 9.0.
```
created_at: 2025-04-04T18:10:49Z
author_association: MEMBER
diff_hunk: @@ -201,6 +201,13 @@ In previous versions of Gradle, special handling would apply when the `ear`, `wa
 ==== The Ear and War plugins may add additional artifacts to the archives configuration
 In previous versions of Gradle, special handling would apply when the `ear`, `war` and `java` plugins were applied to a project in any combination. For example, if the `ear` plugin was applied, the war and jar artifacts would not be included in the `archives` configuration.  Similarly, if the `war` plugin were applied, the jar artifact would not be included in the `archives` configuration.  This special handling has been removed in Gradle 9.0.  This means that the artifacts for all plugins applied will be included in the `archives` configuration.  For example, if the `ear`, `war`, and `jar` plugins are applied to a project, the ear, war and jar artifacts will all be included in the `archives` configuration.
 
+==== `kotlinDslPluginOptions.jvmTarget` has been removed
+
+Previously, you could use `kotlinDslPluginOptions.jvmTarget` to configure which JVM target should be used for compiling code when using the `kotlin-dsl` plugin.
+
+Starting with Gradle 9.0, `kotlinDslPluginOptions.jvmTarget` has been removed.
path: platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
user: login: lkasso
body: ```suggestion
```
created_at: 2025-04-04T18:11:02Z
author_association: MEMBER
diff_hunk: @@ -201,6 +201,13 @@ In previous versions of Gradle, special handling would apply when the `ear`, `wa
 ==== The Ear and War plugins may add additional artifacts to the archives configuration
 In previous versions of Gradle, special handling would apply when the `ear`, `war` and `java` plugins were applied to a project in any combination. For example, if the `ear` plugin was applied, the war and jar artifacts would not be included in the `archives` configuration.  Similarly, if the `war` plugin were applied, the jar artifact would not be included in the `archives` configuration.  This special handling has been removed in Gradle 9.0.  This means that the artifacts for all plugins applied will be included in the `archives` configuration.  For example, if the `ear`, `war`, and `jar` plugins are applied to a project, the ear, war and jar artifacts will all be included in the `archives` configuration.
 
+==== `kotlinDslPluginOptions.jvmTarget` has been removed
+
+Previously, you could use `kotlinDslPluginOptions.jvmTarget` to configure which JVM target should be used for compiling code when using the `kotlin-dsl` plugin.
+
+Starting with Gradle 9.0, `kotlinDslPluginOptions.jvmTarget` has been removed.
+You should <<kotlin_dsl#sec:kotlin-dsl_plugin,configure a Java Toolchain>> instead.
path: platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc
user: login: lkasso
body: ```suggestion
To set the target JVM version going forward, you should <<kotlin_dsl#sec:kotlin-dsl_plugin,configure a Java Toolchain>> instead.
```
created_at: 2025-04-04T18:11:24Z
author_association: MEMBER

PR comments:
user: login: jbartok
created_at: 2025-04-02T11:54:22Z
body: @bot-gradle test this
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-02T11:54:26Z
body: <!-- {"replyTargetCommentId":2772324749,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96651268","headRef":"b7159862de8d3f1ecf9a1a562396b7832bb147ee"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96651268)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=b7159862de8d3f1ecf9a1a562396b7832bb147ee,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-02T13:31:12Z
body: The following builds have failed:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96651268)
  - [Build Scan](https://ge.gradle.org/scans?search.buildOutcome=failure&amp;search.tags=CI&amp;search.names=gitCommitId&amp;search.values=b7159862de8d3f1ecf9a1a562396b7832bb147ee&amp;)

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-03T07:47:38Z
body: @bot-gradle help
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-03T07:47:41Z
body: <!-- {"replyTargetCommentId":2774773674,"triggeredTeamCityBuilds":[]} -->
Currently, the following commands are supported:

<details>
<summary><code>@bot-gradle test this</code></summary>
<p>

This is equivalent to <code>@bot-gradle test PullRequestFeedback</code>.
</details>

<details>
<summary><code>@bot-gradle test {BuildTrigger1} ... {BuildTriggerN} [without PTS] [on linux]</code></summary>
<p>

Add `without PTS` to run the build with full test coverage.

Add `on linux/windows/macos` to run the build on specific OS (only support stage trigger).

Add the following code block to specify build parameters:

````
@bot-gradle test X
```
additional.gradle.parameters=-PrerunAllTests
```
````

- A build trigger is a special build for this PR on TeamCity, common triggers are:
   - `SanityCheck`/`CompileAll`/`QuickFeedbackLinux`/`QuickFeedback`/`PullRequestFeedback`/`ReadyForNightly`/`ReadyForRelease`
   - Shortcuts: `SC`/`CA`/`QFL`/`QF`/`PRF`/`RFN`/`RFR`
   - Specific builds:
     - `BD`: `BuildDistributions`/`BuildDocs` so that you can preview the generated docs/distribution.
     - `PT`: `PerformanceTest`, all performance tests for Ready For Nightly stage.
     - `APT`: `AllPerformanceTest`, all performance tests, including slow performance tests.
     - `ACT`: `AllCrossVersionTests`, all cross version tests in ReadyForNightly and ReadyForRelease.
     - `AST`: `AllSmokeTestsPullRequestFeedback`
     - `AFT`: `AllFunctionalTestsPullRequestFeedback`
     - `ASB`: `AllSpecificBuildsPullRequestFeedback`
     - `ACC`: `AllConfigCacheTestsPullRequestFeedback`
     - `ACTN`: `AllCrossVersionTestsReadyForNightly`
     - `AFTN`: `AllFunctionalTestsReadyForNightly`
     - `ACTR`: `AllCrossVersionTestsReadyForRelease`, alias of `ACT`
     - `AFTR`: `AllFunctionalTestsReadyForRelease`
</details>

<details>
<summary><code>@bot-gradle squash</code></summary>
<p>

- Squash the current pull request into a single commit. The squash message will come from the pull request body, with:
  - All `Signed-off-by:` lines kept.
  - All authors being `Co-Authored-By:`
</details>

<details>
<summary><code>@bot-gradle merge</code></summary>
<p>

- Enqueue this PR into GitHub merge queue for merging.
   - GitHub will create a merge commit from your PR branch HEAD and the target branch
   - A [GitHub Merge Queue Check Pass](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_GitHubMergeQueueCheckPass) build will be triggered on the merge commit
   - When the build passes, the target branch will be fast-forwarded to this merge commit (i.e. merge the PR)
</details>

<details>
<summary><code>@bot-gradle squash and merge</code></summary>
<p>

- Squash the current pull request into a single commit as described in `squash` command above,
  then enqueue this PR into GitHub merge queue as described in `merge` command above.
</details>

<details>
<summary><code>@bot-gradle cherrypick to {branch}</code></summary>
<p>

- Cherrypicks the current PR to another branch.
  A new PR will be created and a build will triggered automatically if there is no conflict.
</details>

<details>
<summary><code>@bot-gradle cancel</code></summary>
<p>

- cancel a running build in GitHub merge queue and remove the PR from the queue

</details>

<details>
<summary><code>@bot-gradle clean</code></summary>
<p>

- clear the conversation history

</details>

<details>
<summary><code>@bot-gradle help</code></summary>
<p>

- display this message

</details>

To run a command, simply submit a comment.  For detailed instructions see [here](https://bt-internal-docs.grdev.net/gbt/tools-and-services/gradle-bot/).

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-03T09:02:34Z
body: @bot-gradle test PRF AST
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-03T09:02:42Z
body: <!-- {"replyTargetCommentId":2774969363,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96691856","headRef":"9419e37455a0530b385eb080beb3d95c3aff36af"},{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger","buildId":"96691692","headRef":"9419e37455a0530b385eb080beb3d95c3aff36af"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96691856)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=9419e37455a0530b385eb080beb3d95c3aff36af,PullRequestFeedback&amp;)
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/build/96691692)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=9419e37455a0530b385eb080beb3d95c3aff36af,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-03T09:46:30Z
body: The following builds have passed:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96691856)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=9419e37455a0530b385eb080beb3d95c3aff36af,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-03T10:12:22Z
body: The following builds have passed:
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger/96691692)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=9419e37455a0530b385eb080beb3d95c3aff36af,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-04T07:43:54Z
body: @bot-gradle test PRF AST
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-04T07:44:01Z
body: <!-- {"replyTargetCommentId":2777836398,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96734236","headRef":"2e525a24bae51d16c208ccda0ddc471f16e5ef58"},{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger","buildId":"96734072","headRef":"2e525a24bae51d16c208ccda0ddc471f16e5ef58"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96734236)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=2e525a24bae51d16c208ccda0ddc471f16e5ef58,PullRequestFeedback&amp;)
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/build/96734072)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=2e525a24bae51d16c208ccda0ddc471f16e5ef58,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T08:09:43Z
body: The following builds have passed:
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger/96734072)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=2e525a24bae51d16c208ccda0ddc471f16e5ef58,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T08:42:43Z
body: The following builds have passed:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96734236)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=2e525a24bae51d16c208ccda0ddc471f16e5ef58,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-04T11:24:16Z
body: @bot-gradle test PRF AST
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-04T11:24:28Z
body: <!-- {"replyTargetCommentId":2778411389,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96748242","headRef":"6f81c0748585be5bec7711356ec1aa6e866a141c"},{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger","buildId":"96748078","headRef":"6f81c0748585be5bec7711356ec1aa6e866a141c"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96748242)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=6f81c0748585be5bec7711356ec1aa6e866a141c,PullRequestFeedback&amp;)
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/build/96748078)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=6f81c0748585be5bec7711356ec1aa6e866a141c,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T11:45:35Z
body: The following builds have passed:
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger/96748078)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=6f81c0748585be5bec7711356ec1aa6e866a141c,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T14:24:35Z
body: The following builds have passed:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96748242)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=6f81c0748585be5bec7711356ec1aa6e866a141c,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-04T14:39:27Z
body: @bot-gradle test PRF AST
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-04T14:39:42Z
body: <!-- {"replyTargetCommentId":2778928758,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96763778","headRef":"302c5059191f76b72aca650d1601f83ffa3e6149"},{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger","buildId":"96763598","headRef":"302c5059191f76b72aca650d1601f83ffa3e6149"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96763778)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=302c5059191f76b72aca650d1601f83ffa3e6149,PullRequestFeedback&amp;)
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/build/96763598)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=302c5059191f76b72aca650d1601f83ffa3e6149,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T15:09:49Z
body: The following builds have failed:
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger/96763598)
  - [Build Scan](https://ge.gradle.org/scans?search.buildOutcome=failure&amp;search.tags=CI&amp;search.names=gitCommitId&amp;search.values=302c5059191f76b72aca650d1601f83ffa3e6149&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-04T16:43:30Z
body: The following builds have failed:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96763778)
  - [Build Scan](https://ge.gradle.org/scans?search.buildOutcome=failure&amp;search.tags=CI&amp;search.names=gitCommitId&amp;search.values=302c5059191f76b72aca650d1601f83ffa3e6149&amp;)

author_association: COLLABORATOR
user: login: jbartok
created_at: 2025-04-05T17:56:39Z
body: @bot-gradle test PRF AST
author_association: MEMBER
user: login: bot-gradle
created_at: 2025-04-05T17:56:53Z
body: <!-- {"replyTargetCommentId":2781018222,"triggeredTeamCityBuilds":[{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_Trigger","buildId":"96791747","headRef":"17b2f2f10f754412f7a6093eb565df6606052523"},{"buildConfigurationId":"Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger","buildId":"96791583","headRef":"17b2f2f10f754412f7a6093eb565df6606052523"}]} -->
I've triggered the following builds:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/build/96791747)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=17b2f2f10f754412f7a6093eb565df6606052523,PullRequestFeedback&amp;)
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/build/96791583)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=17b2f2f10f754412f7a6093eb565df6606052523,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-05T19:08:47Z
body: The following builds have passed:
- [All Smoke Tests for Pull Request Feedback (Trigger) (Pull Request Feedback)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_SmokeTests_Trigger/96791583)
  - [Build Scan](https://ge.gradle.org/scans?search.tags=CI&amp;search.names=gitCommitId,PartOf&amp;search.values=17b2f2f10f754412f7a6093eb565df6606052523,PullRequestFeedback&amp;)

author_association: COLLABORATOR
user: login: bot-gradle
created_at: 2025-04-05T19:50:22Z
body: The following builds have been cancelled:
- [Pull Request Feedback (Trigger) (Check)](https://builds.gradle.org/buildConfiguration/Gradle_Master_Check_Stage_PullRequestFeedback_Trigger/96791747)
  - [Build Scan](https://ge.gradle.org/scans?search.buildOutcome=failure&amp;search.tags=CI&amp;search.names=gitCommitId&amp;search.values=17b2f2f10f754412f7a6093eb565df6606052523&amp;)

author_association: COLLABORATOR