Skip to content

Fat Jar example not working with Gradle 7.x #11601

@mlensment

Description

@mlensment

Gradle version: 7.3.2

➜ ./gradlew jar

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/ml/projects/java-hello-world/build.gradle' line: 15

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not get unknown property 'compile' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

* 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

BUILD FAILED in 582ms

configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }

Fix seems to change compile to runtimeClasspath

More information:
https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal

Metadata

Metadata

Assignees

No one assigned

    Labels

    on-jiratriagedIssues reviewed by a dev and considered valid. Will be added in Jira.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions