diff --git a/src/main/groovy/no/tornado/fxlauncher/gradle/FXLauncherExtension.groovy b/src/main/groovy/no/tornado/fxlauncher/gradle/FXLauncherExtension.groovy index 2fcb57e..d2e328f 100644 --- a/src/main/groovy/no/tornado/fxlauncher/gradle/FXLauncherExtension.groovy +++ b/src/main/groovy/no/tornado/fxlauncher/gradle/FXLauncherExtension.groovy @@ -55,6 +55,34 @@ class FXLauncherExtension { List javapackagerOptions String javapackerNativeParam = "" + /** + * The text that the launcher will show when showing the FXLauncher updating user interface. + *

+ * The default is Updating.... + */ + String updateText + + /** + * The CSS styling to apply to the {@link #updateText} Label. + *

+ * The default is -fx-font-weight: bold;. + */ + String updateLabelStyle + + /** + * The CSS styling to apply to the progress bar. + *

+ * The default is -fx-pref-width: 200;. + */ + String progressBarStyle + + /** + * The CSS styling to apply to the VBox that contains the update text and the progress bar. + *

+ * The default is -fx-spacing: 10; -fx-padding: 25;. + */ + String wrapperStyle + String cacheDir Boolean acceptDowngrade @@ -70,7 +98,6 @@ class FXLauncherExtension { final Project project - FXLauncherExtension(Project project) { this.project = project applicationVersion = project.version diff --git a/src/main/groovy/no/tornado/fxlauncher/gradle/GenerateApplicationManifestTask.groovy b/src/main/groovy/no/tornado/fxlauncher/gradle/GenerateApplicationManifestTask.groovy index 95c036b..22b7e43 100644 --- a/src/main/groovy/no/tornado/fxlauncher/gradle/GenerateApplicationManifestTask.groovy +++ b/src/main/groovy/no/tornado/fxlauncher/gradle/GenerateApplicationManifestTask.groovy @@ -37,12 +37,25 @@ class GenerateApplicationManifestTask extends DefaultTask { FXLauncherExtension fxlauncher = project.extensions.fxlauncher + // These first three arguments are required by the CreateManifest class. def args = [ fxlauncher.resolveApplicationUrl(), fxlauncher.resolveApplicationMainClass(), fxlauncher.resolveWorkingDirectory().absolutePath ] + if (fxlauncher.updateText) + args += '--update-text=' + fxlauncher.updateText + + if (fxlauncher.updateLabelStyle) + args += '--update-label-style=' + fxlauncher.updateLabelStyle + + if (fxlauncher.progressBarStyle) + args += '--progress-bar-style=' + fxlauncher.progressBarStyle + + if (fxlauncher.wrapperStyle) + args += '--wrapper-style=' + fxlauncher.wrapperStyle + if (fxlauncher.cacheDir) args += '--cache-dir=' + fxlauncher.cacheDir