Skip to content

[IJ Plugin] Gradle JDK location settings are not respected which results in rogue Gradle daemons created #6418

Closed
@scana

Description

@scana

Version

4.1.1

Summary

Hi! We're hosting a JDK in a custom location for our project and it seems to result with the plugin launching two separate Gradle daemons due to JDK version mismatch. The ones spawned by the plugin seems to be using default one, baked in within the IDE. I suppose this is caused by Automatic code generation. Disabling the plugin resolves the issue which is why I'm reporting it here.

For some reason both of the daemons seem to be constantly active, allocating memory, even if I keep the Android Studio inactive, see screenshots. The second one also indicates an issue with spawning too many threads (?)

Now, our project is quite big (dozens of graphql modules), but I wouldn't expect two daemons to run for so long without any visible changes in the project. I've yet to test how it does behave if a developer uses baked-in IDE JDK as then I'd assume that it would keep the main daemon constantly busy.

What Screen
First daemon (IDE JDK) Image
Second daemon (IDE JDK) Image
Third daemon (proper JDK) Image
First daemon (5 min uptime) Image
First daemon (12 min uptime) Image
First daemon (22 min uptime) Image
Second daemon (5 min uptime) Image
Second daemon (12 min uptime) Image
Second daemon (22 min uptime) Image

Steps to reproduce the behavior

  • Install Apollo GraphQL
  • Set globally accessible variable STUDIO_GRADLE_JDK to any valid custom path containing a JDK.
  • Close Android Studio
  • ensure all Gradle daemons are killed
  • Launch Android Studio, after a while 2 daemons with default JDK should spawn.

Repeat the same with Apollo GraphQL plugin disabled

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions