@Override
  public int getMajorJavaVersion() {
    JavaVersion version = JavaVersion.current();
    JavaPluginExtension javaPluginExtension =
        project.getExtensions().findByType(JavaPluginExtension.class);
    if (javaPluginExtension != null) {
      version = javaPluginExtension.getTargetCompatibility();
    }
    return Integer.valueOf(version.getMajorVersion());
  }
Returns the input files for a task. These files include the gradle {@link
org.gradle.api.artifacts.Configuration}, output directories (classes, resources, etc.) of the
main {@link org.gradle.api.tasks.SourceSet}, and any extraDirectories defined by the user to
include in the container.

@param project the gradle project
@param extraDirectories the image's configured extra directories
@return the input files
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/GradleProjectProperties.java