Make the Kotlin plugin shut up!

Love Kotlin, but the thing that drives me crazy is the Kotlin plugin constantly offering to configure Kotlin for me. I do have it configured! I just do it in a more indirect way that puts all dependency declarations into a separate gradle file so I am not doing it in the way the plugin would, but it is all configured.

I also have run into the fact that I use both Android Studio and Idea and if I have a project in Android Studio that is configured as straight Kotlin (non-Android) it wants to configure it as Kotlin Android and vice-versa in Idea.

I am sick and tired of these notifications. Tell me how to make it shut up!!

2 Likes

I have the same problem. Iā€™ve setup my project using Maven and Iā€™m using Kotlin (Javascript) in several of the sub modules, but IntelliJ wantā€™s to add a Kotlin dependency on the root project (which I donā€™t).

Kotlin plugin is not too clever at the moment in detecting whether or not your Gradle build depends on Kotlin. Please vote this issue to improve this situation.

Meanwhile, I did not check this myself but judging by the code, introducing two following strings in any form (for example, in comments) into your build.gradle file should help:

  1. apply plugin: 'kotlin' (source)
  2. compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" (source)

Iā€™m still getting the popup even after copy-pasting these two lines. In case it matters, Iā€™m generating the IntelliJ project using gradlew idea.

You can disable the notification by opening Settings ā†’ Appearance & Behavior ā†’ Notifications and setting the popup setting for ā€œconfigure Kotlin in Projectā€ to ā€œNo popupā€. You can also uncheck the ā€œLogā€ column to disable logging the notification.

3 Likes

I promise I looked for such a setting before starting this thread, but couldnā€™t find it. I was unfortunately looking under K for Kotlin

Iā€™m not sure exactly what of the following things made it stop, but they did!

The sub-project where the banner wouldnā€™t go away hadnā€™t been imported it in my top-level settings.gradle file. In fact, it was configured as a standalone project inside my workspace. So I deleted the settings.gradle file associated with the kotlin sub-project, and then added the import statement for that project in my top-level settings.gradle file.

After that, the IDE stopped bugging me about it. Most of my issues with IntelliJ occur when the Gradle build system is configured differently than the IDE. You might want to go through your build files and make sure all of the dots are connected. Sorry I canā€™t be more specific; Iā€™m not exactly sure why this worked for me.

@kirill_rakhman explained it really simple and it works, I added a screenshot to it, maybe this can help

In the line where it says ā€œConfigure Kotlin in Projectā€ there is a column with ā€œPopupā€ and you can click in the item there and it will give you more options ā€œNo popupā€ / ā€œBalloonā€ / ā€œSticky balloonā€:

Try again :wink: