Package org.gradle.api.plugins
Class ApplicationPluginConvention
- java.lang.Object
-
- org.gradle.api.plugins.ApplicationPluginConvention
-
public class ApplicationPluginConvention extends Object
The
Conventionused for configuring theApplicationPlugin.
-
-
Constructor Summary
Constructors Constructor Description ApplicationPluginConvention(Project project)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<String>getApplicationDefaultJvmArgs()Array of string arguments to pass to the JVM when running the applicationCopySpecgetApplicationDistribution()The specification of the contents of the distribution.StringgetApplicationName()The name of the application.StringgetMainClassName()The fully qualified name of the application's main class.ProjectgetProject()voidsetApplicationDefaultJvmArgs(Iterable<String> applicationDefaultJvmArgs)Array of string arguments to pass to the JVM when running the applicationvoidsetApplicationDistribution(CopySpec applicationDistribution)voidsetApplicationName(String applicationName)The name of the application.voidsetMainClassName(String mainClassName)The fully qualified name of the application's main class.
-
-
-
Constructor Detail
-
ApplicationPluginConvention
public ApplicationPluginConvention(Project project)
-
-
Method Detail
-
getApplicationName
public String getApplicationName()
The name of the application.
-
setApplicationName
public void setApplicationName(String applicationName)
The name of the application.
-
getMainClassName
public String getMainClassName()
The fully qualified name of the application's main class.
-
setMainClassName
public void setMainClassName(String mainClassName)
The fully qualified name of the application's main class.
-
getApplicationDefaultJvmArgs
public Iterable<String> getApplicationDefaultJvmArgs()
Array of string arguments to pass to the JVM when running the application
-
setApplicationDefaultJvmArgs
public void setApplicationDefaultJvmArgs(Iterable<String> applicationDefaultJvmArgs)
Array of string arguments to pass to the JVM when running the application
-
getApplicationDistribution
public CopySpec getApplicationDistribution()
The specification of the contents of the distribution.
Use this
CopySpecto 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.
-
setApplicationDistribution
public void setApplicationDistribution(CopySpec applicationDistribution)
-
getProject
public final Project getProject()
-
-