Package gmbh.pagina.tools.gradle.mac_app
Class AppBundler
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
gmbh.pagina.tools.gradle.mac_app.AppBundler
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@CacheableTask
public class AppBundler
extends org.gradle.api.DefaultTask
Create a mac app file structure.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets additional JavaX dictionary entries.Returns the additional JavaX entries map property.Gets additional top-level Info.plist entries.Returns the additional top-level plist entries map property.org.gradle.api.file.ConfigurableFileCollectionGets additional resource file inputs for Gradle incremental checks.Gets additional resource paths to copy into the app bundle.Gets the app name.org.gradle.api.provider.Property<String> Returns the app name property.Gets the bundle identifier.Gets the copyright string.Gets the CFBundle development region.getIcon()Gets the icon file path.Gets the icon file input for Gradle incremental checks.org.gradle.api.provider.Property<String> Returns the icon property.org.gradle.api.file.ConfigurableFileCollectionGets the Java application stub input files.Gets Java system property arguments.org.gradle.api.provider.ListProperty<String> Returns the Java properties list property.The app bundle that is generated.The archive path traditionally generated alongside the app bundle.Gets main-class arguments.org.gradle.api.provider.ListProperty<String> Returns the main arguments list property.Gets the fully-qualified main class name.org.gradle.api.provider.Property<String> Returns the main class property.org.gradle.api.file.ConfigurableFileCollectionGets the main JAR input files.Gets the NativeJavaApplicationStub latest preset source.Gets the NativeJavaApplicationStub v1 preset source.Gets the NativeJavaApplicationStub v1.1 preset source.Gets the output directory path.org.gradle.api.file.DirectoryPropertyReturns the output directory property.Gets the four-character PkgInfo signature.Gets the project name.org.gradle.api.provider.Property<String> Returns the project name property.Gets the project version.org.gradle.api.provider.Property<String> Returns the project version property.org.gradle.api.file.ConfigurableFileCollectionGets runtime classpath input files.Gets the splash file path.Gets the optional@2xsplash image file next to the configured splash image.Gets the configured splash image file input.org.gradle.api.provider.Property<String> Returns the splash file property.Gets the main-thread startup flag.org.gradle.api.provider.Property<Boolean> Returns the main-thread startup property.Gets the minimum Java version for launcher metadata.org.gradle.api.provider.Property<Integer> Returns the target Java version property.Gets the precompiled preset source for universalJavaApplicationStub.Gets the shell-script preset source for universalJavaApplicationStub.Gets viewable document UTI values.Gets JVM option arguments.org.gradle.api.provider.ListProperty<String> Returns the VM options list property.voidjavaApplicationStub(groovy.lang.Closure<?> closure) Configures thejavaApplicationStubtask using a delegated closure.voidsetAdditionalJavaXEntries(Map<String, ?> additionalJavaXEntries) Sets additional JavaX dictionary entries.voidsetAdditionalPlistEntries(Map<String, ?> additionalPlistEntries) Sets additional top-level Info.plist entries.voidsetAdditionalResources(String[] additionalResources) Sets additional resources using an array.voidsetAdditionalResources(List<String> additionalResources) Sets additional resources using a list.voidsetAppName(String appName) Sets the app name (without extension).voidsetBundleIdentifier(String bundleIdentifier) Sets the bundle identifier.voidsetCopyright(String copyright) Sets the copyright string.voidsetDevelopmentRegion(String developmentRegion) Sets the CFBundle development region.voidSets the icon file path.voidConfigures thejavaApplicationStubtask from this task.voidsetJavaProperties(String[] javaProperties) Sets Java system property arguments using an array.voidsetJavaProperties(List<String> javaProperties) Sets Java system property arguments using a list.voidsetMainArguments(String[] mainArguments) Sets main-class arguments using an array.voidsetMainArguments(List<String> mainArguments) Sets main-class arguments using a list.voidsetMainClassName(String mainClassName) Sets the fully-qualified main class name.voidSets the output directory.voidSets the output directory path.voidsetPkgInfoSignature(String pkgInfoSignature) Sets the package signature for the PkgInfo file.voidsetProjectName(String projectName) Sets the project name.voidsetProjectVersion(String projectVersion) Sets the project version.voidsetSplashFile(String splashFile) Sets the splash file path.voidsetStartOnMainThread(Boolean startOnMainThread) Sets whether launch must happen on the macOS main thread.voidsetTargetJavaVersion(Integer targetJavaVersion) Sets the minimum Java version for launcher metadata.voidsetViewableDocumentTypes(String[] viewableDocumentTypes) Sets viewable document types using an array.voidsetViewableDocumentTypes(List<String> viewableDocumentTypes) Sets viewable document types using a list.voidsetVmOptions(String[] vmOptions) Sets JVM option arguments using an array.voidsetVmOptions(List<String> vmOptions) Sets JVM option arguments using a list.voidThe main action: execute the task and generate the unsigned app bundle.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
AppBundler
public AppBundler()Creates the task with default group and description.
-
-
Method Details
-
getAppName
Gets the app name.- Returns:
- the app name
-
setAppName
Sets the app name (without extension).- Parameters:
appName- the app name to set
-
getOutdir
Gets the output directory path.- Returns:
- the output directory absolute path
-
setOutdir
Sets the output directory path.- Parameters:
outdir- the output directory path
-
setOutdir
Sets the output directory.- Parameters:
outdir- the output directory
-
getPkgInfoSignature
Gets the four-character PkgInfo signature.- Returns:
- the package signature
-
setPkgInfoSignature
Sets the package signature for the PkgInfo file.- Parameters:
pkgInfoSignature- the four-character package signature
-
getDevelopmentRegion
Gets the CFBundle development region.- Returns:
- the development region, or null when unset
-
setDevelopmentRegion
Sets the CFBundle development region.- Parameters:
developmentRegion- the development region code
-
getBundleIdentifier
Gets the bundle identifier.- Returns:
- the bundle identifier, or null when unset
-
setBundleIdentifier
Sets the bundle identifier.- Parameters:
bundleIdentifier- the bundle identifier
-
getCopyright
Gets the copyright string.- Returns:
- the copyright value, or null when unset
-
setCopyright
Sets the copyright string.- Parameters:
copyright- the copyright value
-
getIcon
Gets the icon file path.- Returns:
- the icon file path, or null when unset
-
setIcon
Sets the icon file path.- Parameters:
icon- the icon file path
-
getAdditionalResources
Gets additional resource paths to copy into the app bundle.- Returns:
- additional resource paths, or null when unset
-
setAdditionalResources
Sets additional resources using an array.- Parameters:
additionalResources- additional resource paths
-
setAdditionalResources
Sets additional resources using a list.- Parameters:
additionalResources- additional resource paths
-
getViewableDocumentTypes
Gets viewable document UTI values.- Returns:
- viewable document types, or null when unset
-
setViewableDocumentTypes
Sets viewable document types using an array.- Parameters:
viewableDocumentTypes- document UTI values
-
setViewableDocumentTypes
Sets viewable document types using a list.- Parameters:
viewableDocumentTypes- document UTI values
-
getJavaProperties
Gets Java system property arguments.- Returns:
- Java property arguments, or null when unset
-
setJavaProperties
Sets Java system property arguments using an array.- Parameters:
javaProperties- Java property arguments
-
setJavaProperties
Sets Java system property arguments using a list.- Parameters:
javaProperties- Java property arguments
-
getVmOptions
Gets JVM option arguments.- Returns:
- JVM options, or null when unset
-
setVmOptions
Sets JVM option arguments using an array.- Parameters:
vmOptions- JVM options
-
setVmOptions
Sets JVM option arguments using a list.- Parameters:
vmOptions- JVM options
-
getMainArguments
Gets main-class arguments.- Returns:
- main arguments, or null when unset
-
setMainArguments
Sets main-class arguments using an array.- Parameters:
mainArguments- main arguments
-
setMainArguments
Sets main-class arguments using a list.- Parameters:
mainArguments- main arguments
-
getAdditionalPlistEntries
Gets additional top-level Info.plist entries.- Returns:
- additional plist entries, or null when unset
-
setAdditionalPlistEntries
Sets additional top-level Info.plist entries.- Parameters:
additionalPlistEntries- additional plist entries
-
getAdditionalJavaXEntries
Gets additional JavaX dictionary entries.- Returns:
- additional JavaX entries, or null when unset
-
setAdditionalJavaXEntries
Sets additional JavaX dictionary entries.- Parameters:
additionalJavaXEntries- additional JavaX entries
-
getStartOnMainThread
Gets the main-thread startup flag.- Returns:
- true/false value, or null when unset
-
setStartOnMainThread
Sets whether launch must happen on the macOS main thread.- Parameters:
startOnMainThread- startup flag
-
getSplashFile
Gets the splash file path.- Returns:
- splash file path, or null when unset
-
setSplashFile
Sets the splash file path.- Parameters:
splashFile- splash file path
-
getMainClassName
Gets the fully-qualified main class name.- Returns:
- the main class name
-
setMainClassName
Sets the fully-qualified main class name.- Parameters:
mainClassName- the main class name
-
getProjectName
Gets the project name.- Returns:
- project name
-
setProjectName
Sets the project name.- Parameters:
projectName- project name
-
getProjectVersion
Gets the project version.- Returns:
- project version
-
setProjectVersion
Sets the project version.- Parameters:
projectVersion- project version
-
getTargetJavaVersion
Gets the minimum Java version for launcher metadata.- Returns:
- target Java version
-
setTargetJavaVersion
Sets the minimum Java version for launcher metadata.- Parameters:
targetJavaVersion- target Java version
-
getJavaApplicationStubFiles
@InputFiles @PathSensitive(NAME_ONLY) public org.gradle.api.file.ConfigurableFileCollection getJavaApplicationStubFiles()Gets the Java application stub input files.- Returns:
- configured stub input files
-
getMainJarFiles
@InputFiles @PathSensitive(NAME_ONLY) public org.gradle.api.file.ConfigurableFileCollection getMainJarFiles()Gets the main JAR input files.- Returns:
- configured main JAR input files
-
getRuntimeClasspath
@Classpath public org.gradle.api.file.ConfigurableFileCollection getRuntimeClasspath()Gets runtime classpath input files.- Returns:
- configured runtime classpath files
-
getAppNameProperty
Returns the app name property.- Returns:
- app name property
-
getOutdirProperty
@Internal public org.gradle.api.file.DirectoryProperty getOutdirProperty()Returns the output directory property.- Returns:
- output directory property
-
getIconProperty
Returns the icon property.- Returns:
- icon property
-
getMainClassNameProperty
Returns the main class property.- Returns:
- main class property
-
getProjectNameProperty
Returns the project name property.- Returns:
- project name property
-
getProjectVersionProperty
Returns the project version property.- Returns:
- project version property
-
getTargetJavaVersionProperty
Returns the target Java version property.- Returns:
- target Java version property
-
getJavaPropertiesProperty
Returns the Java properties list property.- Returns:
- Java properties list property
-
getVmOptionsProperty
Returns the VM options list property.- Returns:
- VM options list property
-
getMainArgumentsProperty
Returns the main arguments list property.- Returns:
- main arguments list property
-
getAdditionalPlistEntriesProperty
@Internal public org.gradle.api.provider.MapProperty<String,Object> getAdditionalPlistEntriesProperty()Returns the additional top-level plist entries map property.- Returns:
- additional plist entries map property
-
getAdditionalJavaXEntriesProperty
@Internal public org.gradle.api.provider.MapProperty<String,Object> getAdditionalJavaXEntriesProperty()Returns the additional JavaX entries map property.- Returns:
- additional JavaX entries map property
-
getStartOnMainThreadProperty
Returns the main-thread startup property.- Returns:
- main-thread startup property
-
getSplashFileProperty
Returns the splash file property.- Returns:
- splash file property
-
getIconFile
Gets the icon file input for Gradle incremental checks.- Returns:
- icon file, or null when no icon is configured
-
getAdditionalResourceFiles
@Optional @InputFiles @PathSensitive(RELATIVE) public org.gradle.api.file.ConfigurableFileCollection getAdditionalResourceFiles()Gets additional resource file inputs for Gradle incremental checks.- Returns:
- additional resource file collection, possibly empty
-
getSplashFileInput
Gets the configured splash image file input.- Returns:
- splash image file, or null when no splash is configured
-
getSplashFile2xInput
Gets the optional@2xsplash image file next to the configured splash image.- Returns:
- retina splash image file, or null when not present
-
setJavaApplicationStub
Configures thejavaApplicationStubtask from this task.- Parameters:
source- combined source descriptor for URL, unzip mode, and executable name
-
javaApplicationStub
public void javaApplicationStub(groovy.lang.Closure<?> closure) Configures thejavaApplicationStubtask using a delegated closure.- Parameters:
closure- configuration closure delegated toJASDownloader
-
getUniversalJavaApplicationStubShell
Gets the shell-script preset source for universalJavaApplicationStub.- Returns:
- shell-script preset source
-
getUniversalJavaApplicationStubPrecompiled
Gets the precompiled preset source for universalJavaApplicationStub.- Returns:
- precompiled preset source
-
getNativeJavaApplicationStubv1
Gets the NativeJavaApplicationStub v1 preset source.- Returns:
- native v1 preset source
-
getNativeJavaApplicationStubv1_1
Gets the NativeJavaApplicationStub v1.1 preset source.- Returns:
- native v1.1 preset source
-
getNativeJavaApplicationStubLatest
Gets the NativeJavaApplicationStub latest preset source.- Returns:
- native latest preset source
-
getMacApp
The app bundle that is generated.- Returns:
- generated app bundle directory
-
getMacAppTarGz
The archive path traditionally generated alongside the app bundle.- Returns:
- generated tar.gz archive file path
-
taskAction
The main action: execute the task and generate the unsigned app bundle.- Throws:
IOException- If required file operations fail.
-