Skip to content

Plugin for creating an installable java package (dmg, exe, etc.) using javapackager command line tool

License

Notifications You must be signed in to change notification settings

ome/omero-javapackager-plugin

Actions Status

OMERO javapackager Gradle plugin

The omero-javapackager-plugin is a Gradle plugin that provides infrastructure for packaging Java applications for different platforms, including .dmg for Mac OS X and .exe for Windows.

Usage

Include the following at the top of your build.gradle file:

plugins {
    id "org.openmicroscopy.packager" version "x.y.z"
}

Targets of the form:

packageNAMEApplicationTYPE

exist for the various components. For example, to create an OMERO.importer .dmg run:

packageImporterApplicationDmg

Gradle plugin configuration example:

deploy {
    main {
        icon = "${projectDir}/icons/omeroInsight" // Change the icon, file extension is automatic depending on OS
        arguments = ["container.xml"]
    }
}

Full custom example:

deploy {
    someApp {
        outputTypes = ["exe", "dmg"]                            // this deploy config will create tasks for exe or dmg installers, depending on OS
        mainClassName = "org.myurl.Main"                        // main class package and name
        javaOptions = ["-Xms256m", "-Xmx1024m"]                 // custom JVM options
        mainJar = "someApp"                                     // you application jar filename
        sourceDir = file("$buildDir/install/someApp)            // the root directory of your distributable application
        sourceFiles = fileTree("$buildDir/install/someApp).include("**/*.*") 
        applicationVersion = "$version"
        dmg {
            systemWide = true
            simple = false
        }
        msi {
            copyright = "MIT"
            addShortcut = false
        }
    }
}

About

Plugin for creating an installable java package (dmg, exe, etc.) using javapackager command line tool

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages