JavaApplication

Configuration for a Java application, defining how to assemble the application.

An instance of this type is added as a project extension by the Java application plugin under the name 'application'.

plugins {
    id 'application'
}

application {
  mainClass.set("com.foo.bar.FooBar")
}

Since

4.10

Functions

Link copied to clipboard
Array of string arguments to pass to the JVM when running the application
Link copied to clipboard
The specification of the contents of the distribution.
Link copied to clipboard
abstract fun getApplicationName(): String
The name of the application.
Link copied to clipboard
abstract fun getExecutableDir(): String
Directory to place executables in
Link copied to clipboard
abstract fun getMainClass(): Property<String>
The fully qualified name of the application's main class.
Link copied to clipboard
abstract fun getMainModule(): Property<String>
The name of the application's Java module if it should run as a module.
Link copied to clipboard
abstract fun setApplicationDefaultJvmArgs(applicationDefaultJvmArgs: Iterable<String>)
Array of string arguments to pass to the JVM when running the application
Link copied to clipboard
abstract fun setApplicationDistribution(applicationDistribution: CopySpec)
Link copied to clipboard
abstract fun setApplicationName(applicationName: String)
The name of the application.
Link copied to clipboard
abstract fun setExecutableDir(executableDir: String)
Directory to place executables in