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

False positive kotlin.stdlib.default.dependency warning #1789

Open
mgroth0 opened this issue Oct 9, 2024 · 0 comments
Open

False positive kotlin.stdlib.default.dependency warning #1789

mgroth0 opened this issue Oct 9, 2024 · 0 comments
Labels

Comments

@mgroth0
Copy link

mgroth0 commented Oct 9, 2024

What happened?

My build gets this warning:

The dependency on the Kotlin Standard Library (stdlib) is automatically added when using the Gradle Kotlin plugin and may conflict with the version provided with the IntelliJ Platform, see: https://jb.gg/intellij-platform-kotlin-stdlib

This is a false positive, as my project does have this line in its gradle.properties file:

kotlin.stdlib.default.dependency=false

This is a gradle subproject, not the root project. I have tested and confirmed that setting kotlin.stdlib.default.dependency=false in a subproject gradle.properties file has the intended effect. However, this code from the plugin is causing a bug:

        kotlinStdlibDefaultDependency.convention(
                    project.providers
                        .gradleProperty("kotlin.stdlib.default.dependency")
                        .map { it.toBoolean() }
                )

This property above should return a value of "false", but instead it returns "true". And the reason why is gradle/gradle#24491 and gradle/gradle#23572.

Relevant log output or stack trace

No response

Steps to reproduce

  1. Create an IntelliJ plugin module as a subproject
  2. Give it a gradle.properties file with kotlin.stdlib.default.dependency=false. Make sure this is in the subproject folder.
  3. Expect no warning, but observe warning.

Gradle IntelliJ Plugin version

2.1.0

Gradle version

8.10.2

Operating System

macOS

Link to build, i.e. failing GitHub Action job

No response

@mgroth0 mgroth0 added the bug label Oct 9, 2024
@mgroth0 mgroth0 changed the title false positive kotlin.stdlib.default.dependency warning False positive kotlin.stdlib.default.dependency warning Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant