The plugin provides a one-stop solution for packaging, distributing and deploying applications for the Java platform using IzPack.
To use the IzPack plugin, include in your build script:
apply plugin: 'com.bmuschko.izpack'
The plugin JAR needs to be defined in the classpath of your build script. It is directly available on Bintray. Alternatively, you can download it from GitHub and deploy it to your local repository. The following code snippet shows an example on how to retrieve it from Bintray:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-izpack-plugin:2.1'
}
}
To define the IzPack standalone compiler dependency please use the izpack
configuration name in your dependencies
closure.
dependencies {
izpack 'org.codehaus.izpack:izpack-standalone-compiler:4.3.4'
}
The IzPack plugin defines the following tasks:
izPackCreateInstaller
: Creates an IzPack-based installer.
The IzPack plugin defines the following convention properties in the izpack
closure:
baseDir
: The base directory of compilation process (defaults tobuild/assemble/izpack
).installerType
: The installer type (defaults tostandard
). You can select betweenstandard
andweb
.installFile
: The location of the IzPack installation file (defaults tosrc/main/izpack/install.xml
).outputFile
: The installer output directory and filename (defaults tobuild/distributions/<projectname>-<version>-installer.jar
).compression
: The compression of the installation (defaults todefault
). You can select betweendefault
,deflate
andraw
.compressionLevel
: The compression level of the installation (defaults to -1 for no compression). Valid values are -1 to 9.appProperties
: TheMap
of application properties to be used for the compilation process (defaults to emptyMap
).
izpack {
baseDir = file("$buildDir/assemble/izpack")
installFile = file('installer/izpack/installer.xml')
outputFile = file("$buildDir/distributions/griffon-${version}-installer.jar")
compression = 'deflate'
compressionLevel = 9
appProperties = ['app.group': 'Griffon', 'app.name': 'griffon', 'app.title': 'Griffon',
'app.version': version, 'app.subpath': "Griffon-$version"]
}