Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect more cases when Scala target is already configured in parameters #24059

Merged
merged 1 commit into from Feb 28, 2023

Conversation

alllex
Copy link
Member

@alllex alllex commented Feb 27, 2023

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:

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:

@alllex alllex added this to the 8.0.2 (unconfirmed) milestone Feb 27, 2023
@alllex alllex self-assigned this Feb 27, 2023
@alllex alllex requested a review from ljacomet February 27, 2023 17:18
@alllex
Copy link
Member Author

alllex commented Feb 27, 2023

@bot-gradle test this

@bot-gradle
Copy link
Collaborator

I've triggered the following builds for you:

@alllex alllex marked this pull request as ready for review February 28, 2023 09:29
@alllex alllex requested a review from a team as a code owner February 28, 2023 09:29
@alllex alllex requested a review from jvandort February 28, 2023 09:29
@alllex
Copy link
Member Author

alllex commented Feb 28, 2023

@bot-gradle test and merge

@bot-gradle
Copy link
Collaborator

I've triggered a build for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java/Scala build with no explicit toolchain: build fails with Gradle 8.0.1 / Scala 2.13
3 participants