code: public void setupCrossCheckTasks()
      {
          final TaskContainer tasks = project.getTasks();
  
          final Task xtest = tasks.create(XTEST_TASK_NAME);
          xtest.setGroup(XTEST_GROUP_NAME);
          xtest.setDescription("Run the unit tests against all supported Checkstyle runtimes");
          tasks.getByName(JavaBasePlugin.BUILD_TASK_NAME).dependsOn(xtest);
  
          for (final DependencyConfig depConfig : buildUtil.getDepConfigs().getAll().values()) {
              final JavaVersion javaLevel = depConfig.getJavaLevel();
              final String csBaseVersion = depConfig.getCheckstyleBaseVersion();
              for (final String csRuntimeVersion : depConfig.getCompatibleCheckstyleVersions()) {
                  if (csBaseVersion.equals(csRuntimeVersion)) {
                      continue;
                  }
  
                  final TestTask testTask = tasks.create(TaskNames.xtest.getName(depConfig, csRuntimeVersion),
                      TestTask.class);
                  testTask.configureFor(depConfig, csRuntimeVersion);
                  testTask.setGroup(XTEST_GROUP_NAME);
                  testTask.setDescription("Run the unit tests compiled for Checkstyle " + csBaseVersion
                          + " against a Checkstyle " + csRuntimeVersion + " runtime (Java level: " + javaLevel + ")");
                  testTask.getReports().getHtml().setEnabled(false);
                  xtest.dependsOn(testTask);
              }
          }
      }
docs: Set up cross-check feature. We provide an 'xcheck' task which depends on a number of Test tasks that run the
  unit tests compiled against every Checkstyle version against all the other Checkstyle libraries. In this way, we
  find out which versions are compatible.