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

Code before:
   */
  public JibExtension(Project project) {
    ObjectFactory objectFactory = project.getObjects();

    from = objectFactory.newInstance(BaseImageParameters.class);
    to = objectFactory.newInstance(TargetImageParameters.class);
    container = objectFactory.newInstance(ContainerParameters.class);
    extraDirectories = objectFactory.newInstance(ExtraDirectoriesParameters.class, project);
    dockerClient = objectFactory.newInstance(DockerClientParameters.class);
    outputPaths = objectFactory.newInstance(OutputPathsParameters.class, project);
    skaffold = objectFactory.newInstance(SkaffoldParameters.class, project);

    pluginExtensions = objectFactory.listProperty(ExtensionParameters.class).empty();
    extensionParametersSpec =
        objectFactory.newInstance(ExtensionParametersSpec.class, pluginExtensions);
    allowInsecureRegistries = objectFactory.property(Boolean.class);
    containerizingMode = objectFactory.property(String.class);
    configurationName =
        objectFactory
            .property(String.class)
            .convention(
                project.provider(
                    () ->
                        System.getProperty(
                            PropertyNames.CONFIGURATION_NAME,
                            JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME)));

    // Sets defaults.
    allowInsecureRegistries.set(DEFAULT_ALLOW_INSECURE_REGISTIRIES);
    containerizingMode.set(DEFAULT_CONTAINERIZING_MODE);
  }

  public void from(Action<? super BaseImageParameters> action) {
    action.execute(from);
  }

  public void to(Action<? super TargetImageParameters> action) {
    action.execute(to);
  }

  public void container(Action<? super ContainerParameters> action) {
    action.execute(container);
  }

  public void extraDirectories(Action<? super ExtraDirectoriesParameters> action) {
    action.execute(extraDirectories);
  }

  public void dockerClient(Action<? super DockerClientParameters> action) {
    action.execute(dockerClient);
  }

Review comment (suggestion):
I don't think this works. The system property should take precedence over the value set in `build.gradle`.

Code after:
   */
  public JibExtension(Project project) {
    ObjectFactory objectFactory = project.getObjects();

    from = objectFactory.newInstance(BaseImageParameters.class);
    to = objectFactory.newInstance(TargetImageParameters.class);
    container = objectFactory.newInstance(ContainerParameters.class);
    extraDirectories = objectFactory.newInstance(ExtraDirectoriesParameters.class, project);
    dockerClient = objectFactory.newInstance(DockerClientParameters.class);
    outputPaths = objectFactory.newInstance(OutputPathsParameters.class, project);
    skaffold = objectFactory.newInstance(SkaffoldParameters.class, project);

    pluginExtensions = objectFactory.listProperty(ExtensionParameters.class).empty();
    extensionParametersSpec =
        objectFactory.newInstance(ExtensionParametersSpec.class, pluginExtensions);
    allowInsecureRegistries = objectFactory.property(Boolean.class);
    containerizingMode = objectFactory.property(String.class);
    configurationName =
        objectFactory
            .property(String.class)
            .convention(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);

    // Sets defaults.
    allowInsecureRegistries.set(DEFAULT_ALLOW_INSECURE_REGISTIRIES);
    containerizingMode.set(DEFAULT_CONTAINERIZING_MODE);
  }

  public void from(Action<? super BaseImageParameters> action) {
    action.execute(from);
  }

  public void to(Action<? super TargetImageParameters> action) {
    action.execute(to);
  }

  public void container(Action<? super ContainerParameters> action) {
    action.execute(container);
  }

  public void extraDirectories(Action<? super ExtraDirectoriesParameters> action) {
    action.execute(extraDirectories);
  }

  public void dockerClient(Action<? super DockerClientParameters> action) {
    action.execute(dockerClient);
  }

  public void outputPaths(Action<? super OutputPathsParameters> action) {
    action.execute(outputPaths);
  }