You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that when gradle-intellij-plugin is applied, these functions are made available in the build script. If gradle-intellij-plugin is imported in buildSrc/build.gradle.kts, then the util functions are available in all build scripts, even if gradle-intellij-plugin isn't applied.
This has some drawbacks
In projects that use gradle-intellij-plugin, IntelliJ must to do more work to index these functions, degrading performance (which is already pretty poor when it comes to Gradle scripts)
Autocomplete contains irrelevant functions
Marking them as internal would reduce the API footprint of gradle-intellij-plugin, reducing the amount of code that needs to be supported
Looking at the utils, most are very specific, so don't need to be exposed.
Others are extension functions of Any, so they are always available - I think it's better if extension functions are kept targeted to a specific type, or limited in availability, to avoid pollution of functions.
Is your feature request related to a problem? Please describe.
gradle-intellij-plugin has a number of util methods and classes that are all exposed as public.
https://github.com/JetBrains/gradle-intellij-plugin/blob/41e090367cceb9b7623e31feb604bd6c382e9352/src/main/kotlin/org/jetbrains/intellij/utils.kt
This means that when gradle-intellij-plugin is applied, these functions are made available in the build script. If gradle-intellij-plugin is imported in
buildSrc/build.gradle.kts
, then the util functions are available in all build scripts, even if gradle-intellij-plugin isn't applied.This has some drawbacks
Looking at the utils, most are very specific, so don't need to be exposed.
https://github.com/JetBrains/gradle-intellij-plugin/blob/41e090367cceb9b7623e31feb604bd6c382e9352/src/main/kotlin/org/jetbrains/intellij/utils/DependenciesDownloader.kt
Others are extension functions of
Any
, so they are always available - I think it's better if extension functions are kept targeted to a specific type, or limited in availability, to avoid pollution of functions.https://github.com/JetBrains/gradle-intellij-plugin/blob/41e090367cceb9b7623e31feb604bd6c382e9352/src/main/kotlin/org/jetbrains/intellij/utils.kt#L263-L268
Describe the solution you'd like
All util methods are marked as 'internal'
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: