fxlauncher-gradle-plugin icon indicating copy to clipboard operation
fxlauncher-gradle-plugin copied to clipboard

implementation & api dependencies don't copy

Open nhajratw opened this issue 7 years ago • 5 comments

Newer gradle versions recommend using the implementation or api keywords instead of compile and runtime. Unfortunately, the plugin doesn't seem to pick up dependencies declared in that way.

https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html

nhajratw avatar Jul 13 '18 15:07 nhajratw

Yep, generateApplicationManifest creates full files , but generateNativeInstaller only copys fxlauncher.jar to bundle.

Now, I use javapackager like it:

javapackager -deploy -native -outdir build -srcdir build/fxlauncher -appclass fxlauncher.Launcher -outfile myapp -name myapp -title myapp -vendor nintha

the batch can instead of generateNativeInstaller after run generateApplicationManifest.

Good luck

nintha avatar Aug 14 '18 14:08 nintha

The CopyAppDependenciesTask is really short and sweet, so this shouldn't be too hard, right?

I'm a total noob when it comes to groovy, but it seems this might be fixed on this line:

project.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->

Here's something helpful!

A dependency graph

https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_configurations_graph

Maybe this is something to be scheduled for version 2.0 when we break other things, too.

TurekBot avatar Dec 20 '18 20:12 TurekBot

Ooh!

Maybe we can solve this using the default configuration!

Here's who lead me to that answer.

TurekBot avatar Dec 21 '18 18:12 TurekBot

i can't tell what default configuration does -- from the graph though, it seems like runtimeElements is the correct one...

nhajratw avatar Dec 21 '18 18:12 nhajratw

@nhajratw, I'm not sure, but according to this guy

the default configuration extendsFrom runtime, runtimeOnly, implementation

TurekBot avatar Dec 21 '18 18:12 TurekBot