Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin 2.0 dependencyCheckAggregate is not working #400

Open
haliltprkk opened this issue Jul 19, 2024 · 2 comments
Open

Kotlin 2.0 dependencyCheckAggregate is not working #400

haliltprkk opened this issue Jul 19, 2024 · 2 comments

Comments

@haliltprkk
Copy link

Recently, we updated our Kotlin version from 1.9.10 to 2.0, after this change dependencyCheck stopped working.
Both the 9.0.10 and 10.0.3 versions plugin gives the error as follows,

`> Task :dependencyCheckAggregate
Verifying dependencies for project ****

Task :dependencyCheckAggregate FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':dependencyCheckAggregate'.

Cannot change dependencies of dependency configuration '*****CompileClasspath' after it has been included in dependency resolution. Use 'defaultDependencies' instead of 'beforeResolve' to specify default dependencies for a configuration.

  • Try:

Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':dependencyCheckAggregate'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at
    .
    .
    .
    .`

    When I downgrade the Kotlin version to 1.9.10 there is no problem.
    Thanks in advance,

@haliltprkk haliltprkk changed the title Kotlin 2.0 dependecyAggregate is not working Kotlin 2.0 dependencyCheckAggregate is not working Jul 19, 2024
@nightm4re94
Copy link
Contributor

nightm4re94 commented Jul 29, 2024

I'm experiencing the exact same issue, would be happy to hear if there's a way around this.

@nightm4re94
Copy link
Contributor

It seems that this is not only related to Kotlin. I have another project where the update to Kotlin 2 did not break the dependency check tasks.

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

No branches or pull requests

2 participants