@TaskAction
  public void listModulesAndTargets() throws IOException {
    Project project = getProject();
    // Ignore parent projects
    if (!project.getSubprojects().isEmpty()) {
      return;
    }
    SkaffoldInitOutput skaffoldInitOutput = new SkaffoldInitOutput();
    skaffoldInitOutput.setImage(Preconditions.checkNotNull(jibExtension).getTo().getImage());
    if (!project.equals(project.getRootProject())) {
      skaffoldInitOutput.setProject(project.getName());
    }
    System.out.println();
    System.out.println("BEGIN JIB JSON");
    System.out.println(skaffoldInitOutput.getJsonString());
  }
Task Action, lists modules and targets.

@throws IOException if an error occurs generating the json string
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/InitTask.java