api / org.gradle.api.plugins / ApplicationPluginConvention

ApplicationPluginConvention

open class ApplicationPluginConvention

The Convention used for configuring the ApplicationPlugin.

Constructors

<init>

ApplicationPluginConvention(project: Project)

Functions

getApplicationDefaultJvmArgs

open fun getApplicationDefaultJvmArgs(): MutableIterable<String>

Array of string arguments to pass to the JVM when running the application

getApplicationDistribution

open fun getApplicationDistribution(): CopySpec

The specification of the contents of the distribution.

Use this org.gradle.api.file.CopySpec to include extra files/resource in the application distribution.

 apply plugin: 'application' applicationDistribution.from("some/dir") { include "*.txt" } 

Note that the application plugin pre configures this spec to; include the contents of "src/dist", copy the application start scripts into the "bin" directory, and copy the built jar and its dependencies into the "lib" directory.

getApplicationName

open fun getApplicationName(): String

The name of the application.

getExecutableDir

open fun getExecutableDir(): String

Directory to place executables in

getMainClassName

open fun getMainClassName(): String

The fully qualified name of the application's main class.

getProject

fun getProject(): Project

setApplicationDefaultJvmArgs

open fun setApplicationDefaultJvmArgs(applicationDefaultJvmArgs: MutableIterable<String>): Unit

Array of string arguments to pass to the JVM when running the application

setApplicationDistribution

open fun setApplicationDistribution(applicationDistribution: CopySpec): Unit

setApplicationName

open fun setApplicationName(applicationName: String): Unit

The name of the application.

setExecutableDir

open fun setExecutableDir(executableDir: String): Unit

Directory to place executables in

setMainClassName

open fun setMainClassName(mainClassName: String): Unit

The fully qualified name of the application's main class.