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

[fix] Don't shadow the standard gradle 'ext' field on tasks. #243

Merged
merged 2 commits into from
Apr 24, 2019
Merged

[fix] Don't shadow the standard gradle 'ext' field on tasks. #243

merged 2 commits into from
Apr 24, 2019

Conversation

GrahamDennis
Copy link
Contributor

[fix] All Gradle Tasks (and many other things) have a special 'ext' extension,
which is of type ExtraPropertiesExtension
(see https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html).
Previously the DockerComposeExtension was shadowing this as it was set as a field
with name 'ext' on the gradle tasks created by this plugin.

Before this PR

It was not possible to set custom properties on the generateDockerCompose task by the usual generateDockerCompose.ext.foo = "bar" method supported by all other Gradle tasks because the GenerateDockerCompose task had a field ext that contained the DockerComposeExtension.

After this PR

This PR removes the ext field on GenerateDockerCompose and DockerComposeUp and gets the DockerComposeExtension directly from the project.

All Gradle Tasks (and many other things) have a special 'ext' extension,
which is of type ExtraPropertiesExtension
(see https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/ExtensionAware.html).
Previously the DockerComposeExtension was shadowing this as it was set as a field
with name 'ext' on the gradle tasks created by this plugin.
@GrahamDennis GrahamDennis requested a review from a team as a code owner April 18, 2019 00:43
Copy link
Member

@pkoenig10 pkoenig10 left a comment

Choose a reason for hiding this comment

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

Thanks @GrahamDennis!

@GrahamDennis
Copy link
Contributor Author

@iamdanfox: Can you approve this?

@iamdanfox iamdanfox changed the title Don't shadow the standard gradle 'ext' field on tasks. [fix] Don't shadow the standard gradle 'ext' field on tasks. Apr 24, 2019
@bulldozer-bot bulldozer-bot bot merged commit 3faece4 into palantir:develop Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants