Repository: GoogleContainerTools/jib
File: jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/ExtraDirectoriesParameters.java (Java)

Code before:
              objects,
              project,
              project.getProjectDir().toPath().resolve("src").resolve("main").resolve("jib"),
              "/"));
    }
    return paths.get();
  }

  /**
   * Sets paths. {@code paths} can be any suitable object describing file paths convertible by
   * {@link Project#files} (such as {@link File}, {@code List<File>}, or {@code List<String>}).
   *
   * @param paths paths to set.
   */
  public void setPaths(Object paths) {
    this.paths.set(
        project.files(paths).getFiles().stream()
            .map(file -> new ExtraDirectoryParameters(objects, project, file.toPath(), "/"))
            .collect(Collectors.toList()));
  }

  /**
   * Sets paths, for lazy evaluation where {@code paths} is a {@link Provider} of a suitable object.
   *
   * @param paths provider of paths to set
   * @see #setPaths(Object)
   */
  public void setPaths(Provider<Object> paths) {
    // Convert Provider<Object> to Provider<List<ExtraDirectoryParameters>>
    this.paths.set(
        paths.map(
            obj ->
                project.files(paths).getFiles().stream()
                    .map(file -> new ExtraDirectoryParameters(objects, project, file.toPath(), "/"))
                    .collect(Collectors.toList())));
  }

  /**
   * Gets the permissions for files in the extra layer on the container. Maps from absolute path on
   * the container to a 3-digit octal string representation of the file permission bits (e.g. {@code
   * "/path/on/container" -> "755"}).
   *
   * @return the permissions map from path on container to file permissions
   */
  @Input
  public MapProperty<String, String> getPermissions() {
    String property = System.getProperty(PropertyNames.EXTRA_DIRECTORIES_PERMISSIONS);
    if (property != null) {
      Map<String, String> parsedPermissions =
          ConfigurationPropertyValidator.parseMapProperty(property);
      if (!parsedPermissions.equals(permissions.get())) {

Review comment (refactor):
Ah I could be oversimplifying this in my mind but the Provider API should allow us to avoid setters all together. Similar to what is being done in https://github.com/GoogleContainerTools/jib/pull/3242, would it be possible to just modify the getter to return a `Property` and remove the setters? 

Code after:
          new ExtraDirectoryParameters(
              objects,
              project,
              project.getProjectDir().toPath().resolve("src").resolve("main").resolve("jib"),
              "/"));
    }
    return paths.get();
  }

  /**
   * Sets paths. {@code paths} can be any suitable object describing file paths convertible by
   * {@link Project#files} (such as {@link File}, {@code List<File>}, or {@code List<String>}).
   *
   * @param paths paths to set.
   */
  public void setPaths(Object paths) {
    this.paths.set(convertToExtraDirectoryParametersList(paths));
  }

  /**
   * Sets paths, for lazy evaluation where {@code paths} is a {@link Provider} of a suitable object.
   *
   * @param paths provider of paths to set
   * @see #setPaths(Object)
   */
  public void setPaths(Provider<Object> paths) {
    this.paths.set(paths.map(this::convertToExtraDirectoryParametersList));
  }

  /**
   * Helper method to convert {@code Object} to {@code List<ExtraDirectoryParameters>} in {@code
   * setFrom}.
   */
  @Nonnull
  private List<ExtraDirectoryParameters> convertToExtraDirectoryParametersList(Object obj) {
    return project.files(obj).getFiles().stream()
        .map(file -> new ExtraDirectoryParameters(objects, project, file.toPath(), "/"))
        .collect(Collectors.toList());
  }

  /**
   * Gets the permissions for files in the extra layer on the container. Maps from absolute path on
   * the container to a 3-digit octal string representation of the file permission bits (e.g. {@code
   * "/path/on/container" -> "755"}).
   *
   * @return the permissions map from path on container to file permissions
   */
  @Input
  public MapProperty<String, String> getPermissions() {
    String property = System.getProperty(PropertyNames.EXTRA_DIRECTORIES_PERMISSIONS);
    if (property != null) {