boolean (String version, Class<?> aClass) { final TargetVersions annotation = aClass.getAnnotation(TargetVersions.class); if (annotation == null) { return false; } return new VersionMatcher(GradleVersion.version(version)).isVersionMatch(annotation); }