Closed pacher closed 5 years ago
Hi @pacher, thanks for the report.
Could you check if the following Gradle distribution fixes the issue for you?
./gradlew wrapper --gradle-distribution-url https://repo.gradle.org/gradle/kotlin-dsl-snapshots-local/gradle-kotlin-dsl-5.2-20190122225509+0000-all.zip
Hello @bamboo
I followed the steps to reproduce and the issue seems to be fixed. Yay! Thanks a lot. Script dependencies are resolved, syntax highlighting and code completion works.
There are still two .gradle
cache folders though, is it normal and expected? Does not feel right.
The second .gradle
is created in IDEA project root folder when a *.gradle.kts
file is opened in IDEA.
Thanks again for the fix and have a nice day ;-)
Good, thanks for the feedback @pacher!
There are still two .gradle cache folders though, is it normal and expected? Does not feel right.
It is expected as the other "IDEA module" imported as a "IDE only included build" is actually its own build.
@eskatos Is it the same IDE support bug that affects Android Studio 3.2? https://github.com/jmfayard/bug-androidstudio-buildsrc https://issuetracker.google.com/issues/123032843
Steps to Reproduce (for bugs)
build.gradle.kts
file in IDEACurrent Behavior
Error "can not access script base class org.gradle.kotlin.dsl.KotlinBuildScript" IDEA can not resolve build script dependencies, everything red, so IDE editing of build scripts is unusable.
Building and running works, ".gradle" cache folder is created in module root (hello-kotlin folder) When
build.gradle.kts
file is opened in IDEA - the second ".gradle" cache folder is created in IDEA project root.Context
It was working fine with gradle 5.0, the problem is in 5.1
The only possible project layout now is when root build script is directly in IDEA project root. Then those two ".gradle" cache folders collapse into one and everything works as expected. But even in layout like
IDEA Project root \ Some other module root folder \ build.gradle.kts
I get two cache folders and broken script resolution.But it would be very nice to have several gradle projects (composite build) as different modules within one IDEA project
Your Environment
Everything fresh with latest updates possible Windows 10, jdk 11.0.1, gradle 5.1, IDEA 2018.3.2, kotlin 1.3.11