-
Notifications
You must be signed in to change notification settings - Fork 20
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
CopyAppDependenciesTask to copy just the changed dependencies #24
base: master
Are you sure you want to change the base?
Conversation
its inputs and outputs. Here I've given the task properties and identified them with the appropriate annotations, as described in the documentation (https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:up_to_date_checks)
* Using the IncrementalTaskInputs, as described in the documentation, to only do something about inputs that have changed. * I don't think I'm passing in the inputs in right, but they need to be passed in somewhere, right? * I realized that I'd made the properties private and like that no one can access them. Did I get them right this time?
File workingDirectory = project.extensions.fxlauncher.resolveWorkingDirectory() | ||
if (!workingDirectory.exists()) workingDirectory.mkdirs() | ||
project.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact -> | ||
void copyDependencies(IncrementalTaskInputs inputs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IncrementalTaskInputs
, is a way, according to the documentation, to check if each input has changed, and only deal with the changed ones.
@@ -54,7 +54,11 @@ class FXLauncherPlugin implements Plugin<Project> { | |||
type: CopyAppDependenciesTask, | |||
group: 'FXLauncher', | |||
description: 'Copies all application runtime dependencies into working directory', | |||
dependsOn: project.tasks.jar | |||
dependsOn: project.tasks.jar, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aalmiray, maybe you can leave one of those newfangled suggestions on how to do this the right way?
Okay, this isn't quite ready yet, but I'm going to start the pull request so it can be seen what I've got so far.
I've been following the suggestions of @aalmiray from Issue #23.