@TaskAction
  public void listFilesAndTargets() {
    Preconditions.checkNotNull(jibExtension);

    try (TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider()) {
      GradleProjectProperties projectProperties =
          GradleProjectProperties.getForProject(
              getProject(),
              getLogger(),
              tempDirectoryProvider,
              jibExtension.getConfigurationName().get());

      GradleRawConfiguration configuration = new GradleRawConfiguration(jibExtension);

      // TODO: move these shared checks with SyncMapMojo into plugins-common
      if (projectProperties.isWarProject()) {
        throw new GradleException(
            "Skaffold sync is currently only available for 'jar' style Jib projects, but the project "
                + getProject().getName()
                + " is configured to generate a 'war'");
      }
      try {
        if (!ContainerizingMode.EXPLODED.equals(
            ContainerizingMode.from(jibExtension.getContainerizingMode()))) {
          throw new GradleException(
              "Skaffold sync is currently only available for Jib projects in 'exploded' containerizing mode, but the containerizing mode of "
                  + getProject().getName()
                  + " is '"
                  + jibExtension.getContainerizingMode()
                  + "'");
        }
      } catch (InvalidContainerizingModeException ex) {
        throw new GradleException("Invalid containerizing mode", ex);
      }

      try {
        String syncMapJson =
            PluginConfigurationProcessor.getSkaffoldSyncMap(
                configuration,
                projectProperties,
                jibExtension.getSkaffold().getSync().getExcludes());

        System.out.println();
        System.out.println("BEGIN JIB JSON: SYNCMAP/1");
        System.out.println(syncMapJson);

      } catch (Exception ex) {
        throw new GradleException("Failed to generate a Jib file map for sync with Skaffold", ex);
      }
    }
  }
Task Action, lists files and container targets.
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/SyncMapTask.java