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

Add support for Gradle v7, fixes #164 #168

Merged
merged 1 commit into from
Apr 17, 2021
Merged

Conversation

olafurpg
Copy link
Member

Also adds a custom error message for users on Gradle v6.7 using the
experimental toolchains feature. We can only support toolchains from
version v6.8.

|try {
| java.nio.file.Files.write(
| java.nio.file.Paths.get('$gradleVersionPath'),
| [gradle.gradleVersion],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some scala feature Im not aware of?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which feature? This is a Groovy script, where you have literal syntax [a] for lists.

Comment on lines +44 to +55
case Some(gradleVersion)
if gradleVersion.startsWith("6.7") &&
toolchains.toolchains.nonEmpty =>
index
.app
.error(
"lsif-java does not support Gradle 6.7 when used together with Java toolchains. " +
"To fix this problem, upgrade to Gradle version 6.8 or newer and try again."
)
CommandResult(1, Nil)
case _ =>
runCompileCommand(toolchains)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this still call runCompileCommand if if gradleVersion.startsWith("6.7") && toolchains.toolchains.nonEmpty evaluates to false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, case _ => is a catchall

Also adds a custom error message for users on Gradle v6.7 using the
experimental toolchains feature. We can only support toolchains from
version v6.8.
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.

None yet

2 participants