Package org.gradle.api.plugins
Interface JavaApplication
public interface 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
- 
Method SummaryModifier and TypeMethodDescriptionArray of string arguments to pass to the JVM when running the applicationThe specification of the contents of the distribution.The name of the application.Directory to place executables inThe fully qualified name of the application's main class.The name of the application's Java module if it should run as a module.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.voidsetExecutableDir(String executableDir) Directory to place executables in
- 
Method Details- 
getApplicationNameString getApplicationName()The name of the application.
- 
setApplicationNameThe name of the application.
- 
getMainModuleThe name of the application's Java module if it should run as a module.- Since:
- 6.4
 
- 
getMainClassThe fully qualified name of the application's main class.- Since:
- 6.4
 
- 
getApplicationDefaultJvmArgsArray of string arguments to pass to the JVM when running the application
- 
setApplicationDefaultJvmArgsArray of string arguments to pass to the JVM when running the application
- 
getExecutableDirString getExecutableDir()Directory to place executables in
- 
setExecutableDirDirectory to place executables in
- 
getApplicationDistributionCopySpec getApplicationDistribution()The specification of the contents of the distribution. Use this CopySpecto include extra files/resource in the application distribution.plugins { id 'application' } 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
 
-