Skip to content

When skaffold invokes jib via gradle, a deprecated feature is used that will not work on gradle 9.0 #4052

@MatsLP

Description

@MatsLP

Environment:

  • jib gradle plugin: 3.3.2
  • Build tool: Gradle 8.1.1
  • OS: ubuntu 22.04
  • skaffold: 2.5.1

Description of the issue:
The jib gradle plugin is using a deprecated feature that will make it incompatible with gradle 9.0, once that is released.
When using gradle 8.1.1 a warning is logged.

Expected behavior:
The jib plugin should transition away from deprecated gradle features.

Steps to reproduce:
When using jib with skaffold, the "_skaffoldFailIfJibOutOfDate" gradle task is invoked.
Invoking this task directly is the easiest way to reproduce the usage of the deprecated feature:

$ ./gradlew _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 _jibSkaffoldFilesV2 -q --console=plain --debug > my_gradle_log.txt
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --stacktrace option to get the stack trace.
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --scan to get full insights.
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
2023-06-23T09:46:16.415+0200 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 3s

When looking more closely at the generated debug log file, we find the following log:

The StartParameter.settingsFile property has been deprecated. This is scheduled to be removed in Gradle 9.0. Setting custom build file to select the default project has been deprecated. Please use 'projectDir' to specify the directory of the default project instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.1.1/userguide/upgrading_version_8.html#configuring_custom_build_layout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions