Package dev.gradleplugins
Class GradleRuntimeCompatibility
- java.lang.Object
-
- dev.gradleplugins.GradleRuntimeCompatibility
-
public final class GradleRuntimeCompatibility extends java.lang.ObjectQuery Gradle runtime compatibility information for specific Gradle version. It supports the Groovy and Kotlin version packaged for each Gradle version. It also supports the minimum Java version supported by each Gradle version.
-
-
Constructor Summary
Constructors Constructor Description GradleRuntimeCompatibility()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgroovyVersionOf(java.lang.String gradleVersion)Returns the Groovy version packaged with the specified Gradle version.static java.lang.StringgroovyVersionOf(org.gradle.util.VersionNumber gradleVersion)Deprecated.static java.util.Optional<java.lang.String>kotlinVersionOf(java.lang.String gradleVersion)Returns the Kotlin version packaged with the specified Gradle version.static java.util.Optional<java.lang.String>kotlinVersionOf(org.gradle.util.VersionNumber gradleVersion)Deprecated.static java.lang.StringlastMinorReleaseOf(java.lang.String gradleVersion)Returns the last minor released Gradle version for the specified major Gradle version.static java.lang.StringlastPatchedVersionOf(java.lang.String gradleVersion)Returns the last patched Gradle version for the specified Gradle version.static org.gradle.api.JavaVersionminimumJavaVersionFor(java.lang.String gradleVersion)Returns the minimum Java version of the specified Gradle version.static org.gradle.api.JavaVersionminimumJavaVersionFor(org.gradle.util.VersionNumber gradleVersion)Deprecated.
-
-
-
Method Detail
-
groovyVersionOf
public static java.lang.String groovyVersionOf(java.lang.String gradleVersion)
Returns the Groovy version packaged with the specified Gradle version.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the Groovy version of the specified Gradle version, never null.
-
groovyVersionOf
@Deprecated public static java.lang.String groovyVersionOf(org.gradle.util.VersionNumber gradleVersion)
Deprecated.Returns the Groovy version packaged with the specified Gradle version.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the Groovy version of the specified Gradle version, never null.
-
minimumJavaVersionFor
public static org.gradle.api.JavaVersion minimumJavaVersionFor(java.lang.String gradleVersion)
Returns the minimum Java version of the specified Gradle version.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the minimum Java version for the specified Gradle version, never null.
-
minimumJavaVersionFor
@Deprecated public static org.gradle.api.JavaVersion minimumJavaVersionFor(org.gradle.util.VersionNumber gradleVersion)
Deprecated.Returns the minimum Java version of the specified Gradle version.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the minimum Java version for the specified Gradle version, never null.
-
kotlinVersionOf
public static java.util.Optional<java.lang.String> kotlinVersionOf(java.lang.String gradleVersion)
Returns the Kotlin version packaged with the specified Gradle version. All Gradle version without Kotlin DSL support will return an empty value.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the Kotlin version for the specified Gradle version, never null.
-
kotlinVersionOf
@Deprecated public static java.util.Optional<java.lang.String> kotlinVersionOf(org.gradle.util.VersionNumber gradleVersion)
Deprecated.Returns the Kotlin version packaged with the specified Gradle version. All Gradle version without Kotlin DSL support will return an empty value.- Parameters:
gradleVersion- a specific Gradle version- Returns:
- the Kotlin version for the specified Gradle version, never null.
-
lastPatchedVersionOf
public static java.lang.String lastPatchedVersionOf(java.lang.String gradleVersion)
Returns the last patched Gradle version for the specified Gradle version. For example, passing Gradle version 6.2 would return 6.2.2, the last patched version of 6.2.x.- Parameters:
gradleVersion- the Gradle version to find the last patched version, must not be null.- Returns:
- the latest patched version for the specified version, never null
-
lastMinorReleaseOf
public static java.lang.String lastMinorReleaseOf(java.lang.String gradleVersion)
Returns the last minor released Gradle version for the specified major Gradle version. For example, passing Gradle version 7.3 would return 7.6, the last minor release of 7.x. The function will return the last patched version as well.- Parameters:
gradleVersion- the Gradle version to find the last minor release for, must not be null- Returns:
- the latest minor version for the specified version, never null
-
-