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

Change in buildSrc is not easily propagated to IntelliJ build scripts editor #962

Closed
eskatos opened this issue Jul 12, 2018 · 2 comments
Closed

Comments

@eskatos
Copy link
Member

eskatos commented Jul 12, 2018

When changing something in buildSrc, the script dependencies for build scripts aren't updated, making the change not visible to the IntelliJ build script editor.

Expected Behavior

Changes should be available right away.

Current Behavior

Changes aren't propagated correctly.

This is because the Gradle Kotlin DSL script dependencies resolver does short-circuit dependencies requests that didn't see a change in either the plugins or buildscript block of scripts. This drastic short-circuit should be removed, for correctness. A more fine grained short-circuit mechanism could be introduced to compensate for the extra processing.

One workaround is to make a change in the plugins or buildscript block of the edited script.

Context

https://youtrack.jetbrains.com/issue/KT-25354

@JLLeitschuh
Copy link
Contributor

JLLeitschuh commented Aug 10, 2018

@eskatos I'm still seeing this issue in my builds.
However, repeatedly refreshing or changing the plugins doesn't fix the issue for me. I have to restart IntelliJ to fix the issue.

------------------------------------------------------------
Gradle 4.9
------------------------------------------------------------

Build time:   2018-07-16 08:14:03 UTC
Revision:     efcf8c1cf533b03c70f394f270f46a174c738efc

Kotlin DSL:   0.18.4
Kotlin:       1.2.41
Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_92 (Oracle Corporation 25.92-b14)
OS:           Mac OS X 10.13.5 x86_64
IntelliJ IDEA 2018.2 (Ultimate Edition)
Build #IU-182.3684.101, built on July 24, 2018
Licensed to Plexxi, Inc. / Jonathan Leitschuh
Subscription is active until December 15, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5

Kotlin IntelliJ Plugin Version: 1.2.60-release-IJ2018.2-1

@neVERberleRfellerER
Copy link

This bug is indeed still present. With Versions.kt in buildSrc that contains dependency versions, classpath still contains old versions after versions were changed in Versions.kt even through gradle itself have already downloaded new dependencies. Restart or change to settings.gradle.kts of root project is necessary for IDEA to detect the changes.

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