class OnGradleVersionCondition extends ProjectGenerationCondition {

	private static final VersionRange GRADLE_6_VERSION_RANGE = VersionParser.DEFAULT
		.parseRange("[2.2.2.RELEASE,2.5.0-RC1)");

	private static final VersionRange GRADLE_7_VERSION_RANGE = VersionParser.DEFAULT.parseRange("[2.5.0-RC1,2.7.10)");

	private static final VersionRange GRADLE_8_VERSION_RANGE = VersionParser.DEFAULT.parseRange("2.7.10");

	@Override
	protected boolean matches(ProjectDescription description, ConditionContext context,
			AnnotatedTypeMetadata metadata) {<FILL_FUNCTION_BODY>}

	private String determineGradleGeneration(Version platformVersion) {
		if (platformVersion == null) {
			return null;
		}
		else if (GRADLE_6_VERSION_RANGE.match(platformVersion)) {
			return "6";
		}
		else if (GRADLE_7_VERSION_RANGE.match(platformVersion)) {
			return "7";
		}
		else if (GRADLE_8_VERSION_RANGE.match(platformVersion)) {
			return "8";
		}
		else {
			return null;
		}
	}

}

		String gradleGeneration = determineGradleGeneration(description.getPlatformVersion());
		if (gradleGeneration == null) {
			return false;
		}
		String[] values = (String[]) metadata.getAnnotationAttributes(ConditionalOnGradleVersion.class.getName())
			.get("value");
		return Arrays.asList(values).contains(gradleGeneration);
	
<methods>public non-sealed void <init>() ,public boolean matches(org.springframework.context.annotation.ConditionContext, org.springframework.core.type.AnnotatedTypeMetadata) <variables>