Package io.github.intisy.gradle.inno
Class InnoSetupTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.github.intisy.gradle.inno.InnoSetupTask
- 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>
public class InnoSetupTask
extends org.gradle.api.DefaultTask
Gradle task that builds a Windows installer using Inno Setup.
Required: fileName, name, jrePath.
Optional: icon, version, parameters, autoStartParameters, autoStart, debug.
Produces an installer executable under the project's build directory.
-
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 TypeMethodDescriptionvoidExecutes the task to build the Windows installer via Inno Setup.getIcon()@NotNull StringgetName()booleanbooleanisDebug()voidsetAutoStart(boolean autoStart) Enables or disables creation of a Startup shortcut.voidsetAutoStartParameters(List<String> autoStartParameters) Sets parameters passed when launching from the Startup shortcut.voidsetDebug(boolean debug) Enables debug logging for the build process.voidSets an optional icon file path (relative to project dir) for the installer and shortcuts.voidSets the file name of the application executable to package.voidsetJrePath(String jrePath) Sets the path to the JRE directory to bundle in the installer.voidSets the application display name.voidsetOutfile(String outfile) Sets the file name of the application executable to package.voidsetParameters(List<String> parameters) Sets parameters passed when launching the app after installation.voidsetVersion(String version) Sets the application version recorded in the installer metadata.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, 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
-
InnoSetupTask
public InnoSetupTask()
-
-
Method Details
-
setInfile
Sets the file name of the application executable to package.- Parameters:
infile- executable file name under build/libs
-
setOutfile
Sets the file name of the application executable to package.- Parameters:
outfile- executable file name under build/libs
-
setName
Sets the application display name.- Parameters:
name- human-readable application name
-
setIcon
Sets an optional icon file path (relative to project dir) for the installer and shortcuts.- Parameters:
icon- relative path to an .ico file
-
setVersion
Sets the application version recorded in the installer metadata.- Parameters:
version- version string (e.g., 1.2.3)
-
setAutoStartParameters
Sets parameters passed when launching from the Startup shortcut.- Parameters:
autoStartParameters- list of parameters or null
-
setParameters
Sets parameters passed when launching the app after installation.- Parameters:
parameters- list of parameters or null
-
setJrePath
Sets the path to the JRE directory to bundle in the installer.- Parameters:
jrePath- path to a JRE folder
-
setAutoStart
public void setAutoStart(boolean autoStart) Enables or disables creation of a Startup shortcut.- Parameters:
autoStart- true to add Startup shortcut
-
setDebug
public void setDebug(boolean debug) Enables debug logging for the build process.- Parameters:
debug- true to enable verbose logging
-
getOutfile
- Returns:
- the executable file name to package
-
getInfile
- Returns:
- the executable file name to package (preferred over outfile if set)
-
getName
- Specified by:
getNamein interfaceorg.gradle.api.Task- Overrides:
getNamein classorg.gradle.api.DefaultTask- Returns:
- the application display name
-
getIcon
- Returns:
- the optional icon path relative to the project, or null
-
getVersion
- Returns:
- the application version string
-
getAutoStartParameters
- Returns:
- parameters for Startup shortcut or null
-
getParameters
- Returns:
- parameters passed when launching after install or null
-
getJrePath
- Returns:
- the JRE folder path to bundle
-
isAutoStart
@Input public boolean isAutoStart()- Returns:
- true if a Startup shortcut should be created
-
isDebug
@Input public boolean isDebug()- Returns:
- true if debug logging is enabled
-
createExe
public void createExe()Executes the task to build the Windows installer via Inno Setup.Validates required properties, configures the
InnoSetuphelper, and triggers the build process.
-