{"record":{"id":"9952e2029d167b0b","repo":"GoogleContainerTools/jib","slug":"detected-gradleversion-current-but-jib-requi","errorCode":null,"errorMessage":"Detected ${GradleVersion.current()}, but jib requires ${GRADLE_MIN_VERSION} or higher. You can upgrade by running 'gradle wrapper --gradle-version=${GRADLE_MIN_VERSION.getVersion()}'.","messagePattern":"Detected (.+?), but jib requires (.+?) or higher\\. You can upgrade by running 'gradle wrapper --gradle-version=(.+?)'\\.","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java","lineNumber":58,"sourceCode":"public class JibPlugin implements Plugin<Project> {\n\n  @VisibleForTesting static final GradleVersion GRADLE_MIN_VERSION = GradleVersion.version(\"5.1\");\n\n  public static final String JIB_EXTENSION_NAME = \"jib\";\n  public static final String BUILD_IMAGE_TASK_NAME = \"jib\";\n  public static final String BUILD_TAR_TASK_NAME = \"jibBuildTar\";\n  public static final String BUILD_DOCKER_TASK_NAME = \"jibDockerBuild\";\n  public static final String SKAFFOLD_FILES_TASK_V2_NAME = \"_jibSkaffoldFilesV2\";\n  public static final String SKAFFOLD_INIT_TASK_NAME = \"_jibSkaffoldInit\";\n  public static final String SKAFFOLD_SYNC_MAP_TASK_NAME = \"_jibSkaffoldSyncMap\";\n  public static final String SKAFFOLD_CHECK_REQUIRED_VERSION_TASK_NAME =\n      \"_skaffoldFailIfJibOutOfDate\";\n\n  public static final String REQUIRED_VERSION_PROPERTY_NAME = \"jib.requiredVersion\";\n\n  private static void checkGradleVersion() {\n    if (GRADLE_MIN_VERSION.compareTo(GradleVersion.current()) > 0) {\n      throw new GradleException(\n          \"Detected \"\n              + GradleVersion.current()\n              + \", but jib requires \"\n              + GRADLE_MIN_VERSION\n              + \" or higher. You can upgrade by running 'gradle wrapper --gradle-version=\"\n              + GRADLE_MIN_VERSION.getVersion()\n              + \"'.\");\n    }\n  }\n\n  /** Check the Jib version matches the required version (if specified). */\n  private static void checkJibVersion() {\n    // todo: should retrieve from project properties?\n    String requiredVersion = System.getProperty(REQUIRED_VERSION_PROPERTY_NAME);\n    if (requiredVersion == null) {\n      return;\n    }\n    String actualVersion = GradleProjectProperties.TOOL_VERSION;","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java#L40-L76","documentation":"JibPlugin.apply calls checkGradleVersion, which compares the running Gradle version (GradleVersion.current()) against Jib's minimum supported Gradle version (GRADLE_MIN_VERSION). If the project's Gradle is older than the minimum, plugin application fails immediately with a GradleException telling the user how to upgrade the wrapper.","triggerScenarios":"Applying the Jib plugin (plugins { id 'com.google.cloud.tools.jib' }) with a Gradle version below GRADLE_MIN_VERSION; typically an old gradle-wrapper.properties distribution URL or an outdated IDE-bundled Gradle.","commonSituations":"Cloning an old project whose wrapper predates the Jib plugin's minimum; CI images with a pinned old Gradle; IDE (IntelliJ/Eclipse) using its own Gradle installation instead of the wrapper; upgrading the Jib plugin without upgrading Gradle.","solutions":["Run `gradle wrapper --gradle-version=<GRADLE_MIN_VERSION>` (or newer) as the error message suggests","Edit gradle/wrapper/gradle-wrapper.properties distributionUrl to a supported Gradle version and re-sync","In the IDE, switch Gradle to 'Use Gradle from: gradle-wrapper.properties' or update the IDE's Gradle version","If Gradle cannot be upgraded, pin/downgrade the Jib plugin to a version supporting your Gradle"],"exampleFix":"// before: gradle/wrapper/gradle-wrapper.properties\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.9-bin.zip\n// after\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.6.1-bin.zip","handlingStrategy":"validation","validationCode":"def required = '7.0' // Jib's GRADLE_MIN_VERSION\nif (org.gradle.util.GradleVersion.current().compareTo(org.gradle.util.GradleVersion.version(required)) < 0) {\n  throw new GradleException(\"Gradle ${required}+ required; wrapper must be upgraded\")\n}","typeGuard":null,"tryCatchPattern":"try {\n  apply plugin: 'com.google.cloud.tools.jib'\n} catch (GradleException e) {\n  if (e.message.contains('jib requires')) {\n    throw new GradleException('Upgrade the Gradle wrapper: ' + e.message)\n  } else { throw e }\n}","preventionTips":["Commit an up-to-date gradle wrapper and always build via ./gradlew","When upgrading the Jib plugin, read its changelog for the new minimum Gradle version","Force IDEs to use the project wrapper, not a bundled Gradle","Keep CI images' Gradle in sync with the wrapper version"],"tags":["gradle","version-compatibility","build-failure","jib"],"backgroundTag":"unsupported-version","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}