Kotlin 1.2.10 introduces weird android SDK requirement?

Hello,

I just updated my kotlin plugin to version 1.2.10 from the IDE (community edition). From that point I changed my gradle file to reflect the new version, and there IDEA started to ask me for an android SDK. The project is not an android application and have nothing to do with android.

Now I see two new button next to the run arrow and the bug icon to start the debugger which were not there before and are most certainly related to android. A message that i cannot remove is now on top my code window stating:

Grade project sync failed. Basic functionality […] will not work properly.

I use two windows for two projects: a library and an desktop application using this library. The library is the one for which i changed the gradle file to point to kotlin 1.2.10 and which is asking for the android SDK. The application on the other hand is still behaving normally, and i haven’t changed the kotlin version in the gradle file there yet.

So, the question: what is going on ? I don’t want to download the android SDK which I will not use, how can I then remove this requirement from my project?

I think I found how to solve the problem. The android requirement has been added in the modules definitions. After removing it and messing around modules, i have been able to restore the expected behavior.

For the record messing around implied: making an error and removing the main module to which the android requirements had been attached. After that I had to recreate the module, but also reselect the sources folder of my sub-modules which had been messed up (because of my mistaken removal of the main module or after the patch messed up with my modules ? I do not know).

As a final note, i tried to change kotlin version to 1.2.10 in my application to see if the android-sdk requirement was added as for my library. It did not ! I don’t understand what introduced it. When the update appeared I just accepted and let the update restart IDEA, then change version in gradle build file, as i usually do.

FYI: https://youtrack.jetbrains.com/issue/IDEA-122904
Root cause could be this.

I forgot to answer:-/
thanks for the reply, i did not know this bug report

Yes, it looks like it may be related, although I managed to work around the problem without too many difficulty (once I knew that modules were the culprit), whereas in the bug report, the workaround is clearly more involved than the simple “remove incriminating modules and recreate” method i used.

Moreover i read this at the beginning: “When importing a Gradle project with an Android subproject”, which is not my case.