vscode-gradle icon indicating copy to clipboard operation
vscode-gradle copied to clipboard

Dokka plugin breaks task scanning

Open MagnusMG opened this issue 2 years ago • 0 comments

Extension Name: vscode-gradle Extension Version: 3.12.3 OS Version: macos 12.5.1 VSCode version: 1.70.2

When I add the plugin org.jetbrains.dokka, the gradle extension is not able to identify tasks properly. See the screenshots below.

(I realise that the problem might be with the dokka plugin rather than with the gradle extension, but I have to start in this end, since this is where the problem shows up.)

  1. Create a gradle project with gradle init. Choose groovy DSL, kotlin implemenation language, and library project.
  2. Open the folder in VSCode and look at the gradle task list.
  3. Add the dokka plugin to the gradle.build file
  4. The gradle task list is not much shorter.

Screenshots

Without dokka plugin

without-dokka-plugin

With dokka plugin

with-dokka-plugin

Output from "Gradle for Java"

[info] Build file changed: /Users/xgumag/Documents/GU/projekt/aktiva_projekt/programmering/kutil/kutil/build.gradle
[info] Java Home: /usr/local/Cellar/openjdk@11/11.0.15/libexec/openjdk.jdk/Contents/Home
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=SE,-Duser.language=sv,-Duser.variant
[info] Gradle User Home: /Users/xgumag/.gradle
[info] Gradle Version: 7.4.1
[error] FAILURE: Build failed with an exception.

* What went wrong:
Could not create task ':kutil:dokkaJavadoc'.
> Cannot change dependencies of dependency configuration ':kutil:dokkaJavadocPlugin' after it has been resolved.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org
[info] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings

CONFIGURE FAILED in 1s
[error] [gradle-server] The supplied build action failed with an exception.
[error] Error getting build for /Users/xgumag/Documents/GU/projekt/aktiva_projekt/programmering/kutil: The supplied build action failed with an exception.
[info] Found 0 tasks

MagnusMG avatar Aug 29 '22 07:08 MagnusMG