FXLauncher Gradle plugin


License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

no.tornado
ArtifactId

ArtifactId

fxlauncher-gradle-plugin
Last Version

Last Version

1.0.21.1
Release Date

Release Date

Type

Type

jar
Description

Description

FXLauncher Gradle plugin
FXLauncher Gradle plugin
Project URL

Project URL

https://github.com/edvin/fxlauncher-gradle-plugin
Source Code Management

Source Code Management

https://github.com/edvin/fxlauncher-gradle-plugin

Download fxlauncher-gradle-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/no.tornado/fxlauncher-gradle-plugin/ -->
<dependency>
    <groupId>no.tornado</groupId>
    <artifactId>fxlauncher-gradle-plugin</artifactId>
    <version>1.0.21.1</version>
</dependency>
// https://jarcasting.com/artifacts/no.tornado/fxlauncher-gradle-plugin/
implementation 'no.tornado:fxlauncher-gradle-plugin:1.0.21.1'
// https://jarcasting.com/artifacts/no.tornado/fxlauncher-gradle-plugin/
implementation ("no.tornado:fxlauncher-gradle-plugin:1.0.21.1")
'no.tornado:fxlauncher-gradle-plugin:jar:1.0.21.1'
<dependency org="no.tornado" name="fxlauncher-gradle-plugin" rev="1.0.21.1">
  <artifact name="fxlauncher-gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='no.tornado', module='fxlauncher-gradle-plugin', version='1.0.21.1')
)
libraryDependencies += "no.tornado" % "fxlauncher-gradle-plugin" % "1.0.21.1"
[no.tornado/fxlauncher-gradle-plugin "1.0.21.1"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.spockframework : spock-core jar 1.0-groovy-2.4

Project Modules

There are no modules declared in this project.

FXLauncher Gradle Plugin

Maven Central Apache License

See usage example in the fxldemo-gradle demo project

The plugin supports the following tasks:

  • copyAppDependencies: Assembles the application into build/fxlauncher
  • generateApplicationManifest: Generates app.xml into build/fxlauncher
  • embedApplicationManifest: Copies app.xml into fxlauncher.jar
  • deployApp: Transfers application to deployTarget via scp
  • generateNativeInstaller: Generates a native installer

Configuration example:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.21'
    }
}

apply plugin: 'no.tornado.fxlauncher'

fxlauncher {
    applicationVendor 'My Company'
    applicationUrl 'http://host/path'
    applicationMainClass 'com.example.Application'
    deployTarget 'username@hostname:path'
}

Please note that the deployApp task requires the scp binary to be present in your path, and that you have installed the corresponding target host key locally and the public key on the target

The deployTarget option also accepts deploying to local file system paths, for example: C:/some/path.

Optionally include scpOptions = ["-v"] to enable verbose output from scp if you run into trouble.

What's new file

Supply whatsNew https://whatsnew/url to include an HTML link that will be shown to the user after update.

Optional parameters

If you need to further customize the parameters to javapackager you can supply the javapackagerOptions parameter, which takes a List<String>. Consult the JavaPackager docs for more information about possible parameters.

Use javapackerNativeParam to supply arguments to javapackager -native flag such as msi or dep in order to generate native installer packages instead of MSI.

User interface customization

You can change how the FXLauncher's user interface looks when it's updating the app.

Update Text

Actual Text

To change the default "Updating..." text, add something like updateText 'Updating CoolApp...' to the fxlauncher section of your build.gradle file.

Text Style

To style the update text, add something like updateLabelStyle '-fx-underline: true;' to the fxlauncher section of your build.gradle file. You can use any valid CSS rule that applies to a Labeled. Here's the list for Labeled, but don't forget about the rules for its parents, Control, Region, Parent, and Node.

Progress Bar

To style the progress bar, add something like progressBarStyle '-fx-accent: lime;' to the fxlauncher section of your build.gradle file. (Hint: -fx-accent happens to be the rule that controls the progress bar's color. See java's modena.css as well as this StackOverflow question)

Text and Bar Wrapper

There's a VBox around everything. To style it, add something like -fx-spacing: 20;to the fxlauncher section of your build.gradle file. You can use any valid CSS rule that applies to a VBox. Here's the list for VBox, but don't forget about the rules for its parents, Pane, Region, Parent, and Node.

Keep update screen until primary stage is shown, even if update is completed

lingeringUpdateScreen true

Versions

Version
1.0.21.1
1.0.21
1.0.20
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.12
1.0.11.2
1.0.11.1
1.0.11