Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24059 Detect more cases when Scala target is alre…
…ady configured in parameters Fixes #23962 When deciding whether to supply Java target from toolchain during Scala compilation configuration, we now detect more cases. More specifically, new cases include specifying a parameter and its value as separate values: ```groovy tasks.withType(ScalaCompile).configureEach { it.scalaCompileOptions.additionalParameters.addAll(['-release', '8']) } ``` An additional target flag variant for Scala 3 (`--Xtarget`) is also detected. Support for these flags in different minor releases of Scala varies, but we need to detect as many variants as possible to avoid overriding the target or release. The sources for Scala flags: - [Scala 2.12.17](https://github.com/scala/scala/blob/v2.13.10/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala#L54-L75) - [Scala 2.13.10](https://github.com/scala/scala/blob/v2.12.17/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala#L59-L82) - [Scala 3.2.2](https://github.com/lampepfl/dotty/blob/3.2.2/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala#L112) Co-authored-by: Alex Semin <asemin@gradle.com>
- Loading branch information
Showing
2 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters