Skip to content

Add support for Gradle v7, fixes #164#168

Merged
olafurpg merged 1 commit into
scip-code:mainfrom
olafurpg:gradle-7
Apr 17, 2021
Merged

Add support for Gradle v7, fixes #164#168
olafurpg merged 1 commit into
scip-code:mainfrom
olafurpg:gradle-7

Conversation

@olafurpg

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants