Rob
Rob

Reputation: 2510

is javafx-gradle plugin secure to use?

I have been looking at this gradle plugin from https://bintray.com/shemnon/javafx-gradle/gradle-javafx-plugin/view

The method for using it is

 apply from: 'http://dl.bintray.com/content/shemnon/javafx-gradle/8.1.1/javafx.plugin'

My question is how secure is this. Could it become unavailable next month and leave me scrambling for another solution? I cant find a way to download it and store a local copy. Am I misunderstanding how grade works? What if the server goes down, will I be unable to work until it is back up?

Upvotes: 0

Views: 435

Answers (2)

moxi
moxi

Reputation: 1452

The plugin you were looking is no longer supported, as you can see in the last comment the author posted of this issue:

https://bitbucket.org/shemnon/javafx-gradle/issues/49/documentation-and-a-working-sample

I found the following project and it's kinda working, it needs some tweaks for a multiple modules project:

https://github.com/FibreFoX/javafx-gradle-plugin

This guy seems to be active on the project nowadays, the lack of documentation is an issue but still you can deploy your JavaFX project, I tried creating a DMG package for Mac, you will have to try the same thing with Windows.

** UPDATE ** It seems that FibreFox is no longer active, but the project isn't dead according to the author: "No, this plugin is not (yet) dead, but the future got very fragile." for more details: https://github.com/FibreFoX/javafx-gradle-plugin/issues/119

Thanks to @Some Guy in the comments section below.

Upvotes: 2

Rob
Rob

Reputation: 2510

This is not exactly an answer to my original question, but ultimately what I was looking at the plugin for was a way to make an exe installer with gradle. In the end I stuck with the normal gradle stuff and used this in my build.gradle. Maybe this will save some one else a half day with google.

// create a single Jar with all dependencies
task fatJar(type: Jar) {
    doFirst {
        from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    }
    exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
    manifest {
        attributes 'Implementation-Title': appName,
                'Implementation-Version': version,
                'Main-Class': mainClassName
    }
    baseName = project.name
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}

// create a windows .exe installer
task buildPackage << {
    if (jdk != null && !jdk.isEmpty()) {
        def javapackager = exec {
            workingDir "${project.projectDir.absolutePath}"
            commandLine "${jdk}\\bin\\javapackager",
                    "-deploy",
                    "-title", appName,
                    "-native", "exe",
                    "-name", appName,
                    "-outdir", "${buildDir.name}${File.separator}dist",
                    "-outfile", appName,
                    "-srcdir", "${buildDir.name}${File.separator}libs",
                    "-appclass", mainClassName
        }
    }
}

Upvotes: 0

Related Questions