# Class BaseForkOptions

java.lang.Object
org.gradle.api.tasks.compile.BaseForkOptions

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ProviderAwareCompilerDaemonForkOptions`

public class BaseForkOptions extends Object implements Serializable
Fork options for compilation. Only take effect if `fork` is `true`.

Since:
  1.3
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseForkOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `@Nullable List<String>`
  `getJvmArgs()`
  Returns any additional JVM arguments for the compiler process.
  `String`
  `getMemoryInitialSize()`
  Returns the initial heap size for the compiler process.
  `String`
  `getMemoryMaximumSize()`
  Returns the maximum heap size for the compiler process.
  `void`
  `setJvmArgs(@Nullable List<String> jvmArgs)`
  Sets any additional JVM arguments for the compiler process.
  `void`
  `setMemoryInitialSize(String memoryInitialSize)`
  Sets the initial heap size for the compiler process.
  `void`
  `setMemoryMaximumSize(String memoryMaximumSize)`
  Sets the maximum heap size for the compiler process.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BaseForkOptions

    public BaseForkOptions()

- ## Method Details

  - ### getMemoryInitialSize

    @Internal public String getMemoryInitialSize()
    Returns the initial heap size for the compiler process. Defaults to `null`, in which case the JVM's default will be used.
    Since:
      1.3

  - ### setMemoryInitialSize

    public void setMemoryInitialSize(String memoryInitialSize)
    Sets the initial heap size for the compiler process. Defaults to `null`, in which case the JVM's default will be used.
    Since:
      1.3

  - ### getMemoryMaximumSize

    @Internal public String getMemoryMaximumSize()
    Returns the maximum heap size for the compiler process. Defaults to `null`, in which case the JVM's default will be used.
    Since:
      1.3

  - ### setMemoryMaximumSize

    public void setMemoryMaximumSize(String memoryMaximumSize)
    Sets the maximum heap size for the compiler process. Defaults to `null`, in which case the JVM's default will be used.
    Since:
      1.3

  - ### getJvmArgs

    @Optional @Input public @Nullable List<String> getJvmArgs()
    Returns any additional JVM arguments for the compiler process. Defaults to the empty list.
    Since:
      1.3

  - ### setJvmArgs

    public void setJvmArgs(@Nullable List<String> jvmArgs)
    Sets any additional JVM arguments for the compiler process. Defaults to the empty list. Empty or null arguments are filtered out because they cause JVM Launch to fail.
    Since:
      1.3