Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jfxJar task should have configurable input #26

Closed
swpalmer opened this issue Aug 4, 2016 · 3 comments
Closed

jfxJar task should have configurable input #26

swpalmer opened this issue Aug 4, 2016 · 3 comments
Assignees

Comments

@swpalmer
Copy link

swpalmer commented Aug 4, 2016

This: https://github.com/FibreFoX/javafx-gradle-plugin/blob/master/examples/javafx-proguard-gradle/build.gradle#L68

...is an ugly hack.

It is bad form to have the obfuscated jar file overwrite the unobfuscated jar file.

Why? Because of Gradle's optimization of not running tasks when the inputs didn't change. By replacing the original jar file with the obfuscated one the jar file is alway different from what the jar task produced. That means that the jar task must always run because the output file won't match what it produced previously.

Instead the jfxJar should allow for the input to be specified so when using an obfuscator it can be configured operate on the obfuscated jar file.

@FibreFoX
Copy link
Owner

FibreFoX commented Aug 4, 2016

Because of Gradle's optimization of not running tasks when the inputs didn't change.

Current implementation of this plugin does always run, so you won't have any benefit of that optimization. To reduce false-positives, and because the bundling-process might change in cause of modified customizable installer-scripts (like for innosetup), I have no good detection of any changes here.

Having the jfxJar-task being configurable seems a valid feature-request tho, but will be implemented as optional with current behaviour as fallback (don't like the idea of failing the build, because wrong file-output).

@FibreFoX FibreFoX self-assigned this Aug 4, 2016
@swpalmer
Copy link
Author

swpalmer commented Aug 4, 2016

I agree that the default should be to pick up the jar task output.

It seems the default task inputs for the packager should be known... e.g. the jar and src/main/deploy/**

But even if the packaging part always runs, at least having jfxJar input configurable will prevent the need to have the jar task always run.

@FibreFoX
Copy link
Owner

Hi there,

I have introduced a new property called alternativePathToJarFile and updated the proguard-example. This changes are not available as -SNAPSHOT-version nor on maven-central, because I'm going to implement some other things before releasing a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants