-
Notifications
You must be signed in to change notification settings - Fork 430
KT-22101 IntellIj suggests unused import for org.gradle.kotlin.dsl.getValue
when using kotlin-dsl
and doesn't suggest import for creating
#564
Comments
Thanks for the well written report @mkobit! One workaround would be to |
Good call with the star import (although I try not to use them) - definitely makes sense to report upstream as this is most likely an IntelliJ issue - I reported it here first due to it being the first and primary place I ran into it. I'll hopefully report it tonight, but if not in the next few days and follow up on this issue. |
Finally reported upstream at https://youtrack.jetbrains.com/issue/KT-22101 - the issue could use a friendlier description that isn't as much |
org.gradle.kotlin.dsl.getValue
when using kotlin-dsl
and doesn't suggest import for creating
org.gradle.kotlin.dsl.getValue
when using kotlin-dsl
and doesn't suggest import for creating
From @big-guy
@big-guy, I don't recall this happening to me. Do you have |
This also happens when using |
When trying to use the domain object extension methods
getting
andcreating
in a plugin when usingkotlin-dsl
it leads to less than ideal behavior.Moving pictures speak a thousand words:
val taskName by tasks.getting
val taskName by tasks.creating
Expected Behavior
import
is not marked as unusedby creating
Current Behavior
import
is grayed out and removed by the Optimize Imports actionby creating
Context
Using
kotlin-dsl
in a plugin I am writingSteps to Reproduce (for bugs)
In
src/main/kotlin/ExampleKotlinDslPlugin.kt
Your Environment
Gradle 4.3-rc-2
IntelliJ IDEA 2017.2.5
Build #IU-172.4343.14, built on September 26, 2017
Licensed to Mike Kobit
You have a perpetual fallback license for this version
Subscription is active until September 5, 2018
JRE: 1.8.0_152-release-915-b12 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.10.0-37-generic
The text was updated successfully, but these errors were encountered: