Skip to content

Write Yaml file to task specific output directory#161

Merged
runningcode merged 2 commits into
runningcode:masterfrom
CristianGM:write-yaml-to-specific-directory
Aug 27, 2020
Merged

Write Yaml file to task specific output directory#161
runningcode merged 2 commits into
runningcode:masterfrom
CristianGM:write-yaml-to-specific-directory

Conversation

@CristianGM

Copy link
Copy Markdown
Contributor

Fixes #147

I know there are some duplicates, but even worst I'm doing a lot in configuration phase, with the change to Gradle 6.0 and using ExecOperations I had that done in a better way, only reading values at execution phase.

@CristianGM
CristianGM force-pushed the write-yaml-to-specific-directory branch 2 times, most recently from a833992 to c2ba0ff Compare August 18, 2020 13:32
@CristianGM
CristianGM force-pushed the write-yaml-to-specific-directory branch from c2ba0ff to 7a41959 Compare August 24, 2020 13:26
@CristianGM
CristianGM requested a review from runningcode August 25, 2020 08:44
@runningcode

Copy link
Copy Markdown
Owner

Thanks so much for this contribution!

@runningcode
runningcode merged commit aa59cca into runningcode:master Aug 27, 2020
}

private fun TaskContainer.createTasksForConfig(base: FlankGradleExtension, config: FladleConfig, project: Project, name: String) {
val writeConfigProps = register("writeConfigProps$name", YamlConfigWriterTask::class.java, base)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CristianGM curious, why did you remove passing the config in the constructor here and instead set it during the configuration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can I declare a Task input as a constructor parameter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I could just add a getter to declare the input.
But actually is that I never used constructor parameters for a task (unless for injected services) and the documentation doesn't mention them a lot.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write Yaml file to task specific output directory

2 participants