Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

KT-24486 - Opening a .gradle.kts file in an imported Gradle project pollutes the package list with empty packages #883

Open
big-guy opened this issue May 16, 2018 · 4 comments

Comments

@big-guy
Copy link
Member

big-guy commented May 16, 2018

When I import kotlin-dsl, I see a reasonable list of packages, but as soon as I open a .gradle.kts file, the list of packages in each module explodes to include the Gradle API packages. Closing/opening the project doesn't clear the list.

This happens in gradle/gradle's buildSrc project too. I've seen this happen in standalone plugin projects too.

Steps to Reproduce (for bugs)

I had commit 6dd79ff checked out. I ran git clean -fxd to make sure there wasn't any Intellij files laying around.

After importing kotlin-dsl, I see this list of packages in the plugins project:
image

After opening provider/build.gradle.kts:
image

This appears to be the shaded Gradle API jar packages. I'm not sure if this is something we're feeding to IntelliJ or a bug on IntelliJ's side?

Your Environment

macOS, IntelliJ 2018.1

@eskatos
Copy link
Member

eskatos commented May 18, 2018

Never seen this before 👀

Ah, it isn't in the Project view but in the Packages view.
Here with one module per source set, but the issue is the same:

image

Looks like somehow IntelliJ puts the packages of the script dependencies, empty, in that context.
Good catch @big-guy!

@eskatos eskatos changed the title Opening a .gradle.kts file in an imported Gradle project pollutes the package list with empty packages KT-24486 - Opening a .gradle.kts file in an imported Gradle project pollutes the package list with empty packages May 18, 2018
@eskatos
Copy link
Member

eskatos commented May 18, 2018

Issue opened upstream at https://youtrack.jetbrains.com/issue/KT-24486

@bamboo
Copy link
Member

bamboo commented May 18, 2018

Those are probably there because we serve the shaded gradleApi() jar to the IDE. Maybe we should serve the actual jars from the distribution instead?

@eskatos
Copy link
Member

eskatos commented May 18, 2018

There are packages not coming from gradleApi() in the ones that show up in the Packages view.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants