private void addProjectFiles(Project project) {
    // Add build config, settings, etc.
    addGradleFiles(project);

    // Add sources + resources
    SourceSetContainer sourceSetContainer =
        project.getExtensions().findByType(SourceSetContainer.class);
    if (sourceSetContainer != null) {
      SourceSet mainSourceSet = sourceSetContainer.findByName(SourceSet.MAIN_SOURCE_SET_NAME);
      if (mainSourceSet != null) {
        mainSourceSet
            .getAllSource()
            .getSourceDirectories()
            .forEach(
                sourceDirectory -> {
                  if (sourceDirectory.exists()) {
                    skaffoldFilesOutput.addInput(sourceDirectory.toPath());
                  }
                });
      }
    }
  }
Prints build files, sources, and resources associated with a project.

@param project the project
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/skaffold/FilesTaskV2.java