All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.autonomousapps.internal.GradleVersions.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.internal

import org.gradle.util.GradleVersion

internal object GradleVersions {

  private val gradle74: GradleVersion = GradleVersion.version("7.4")
  private val gradle75: GradleVersion = GradleVersion.version("7.5")
  private val gradle82: GradleVersion = GradleVersion.version("8.2")
  private val gradle83: GradleVersion = GradleVersion.version("8.3")
  private val gradle85: GradleVersion = GradleVersion.version("8.5")
  private val gradle88: GradleVersion = GradleVersion.version("8.8")

  /** Minimum supported version of Gradle. */
  @JvmField val minGradleVersion: GradleVersion = gradle74

  val current: GradleVersion = GradleVersion.current()

  val isAtLeastMinimum: Boolean = current >= minGradleVersion
  val isAtLeastGradle75: Boolean = current >= gradle75
  val isAtLeastGradle82: Boolean = current >= gradle82
  val isAtLeastGradle83: Boolean = current >= gradle83
  val isAtLeastGradle85: Boolean = current >= gradle85

  /**
   * Minimum version of Gradle for [BuildHealthPlugin][com.autonomousapps.BuildHealthPlugin], because it uses the new
   * lifecycle callbacks.
   */
  val isAtLeastGradle88: Boolean = current >= gradle88
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy