Consider a properties file transformer #73

Closed
aalmiray opened this Issue Jul 16, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@aalmiray
Contributor

aalmiray commented Jul 16, 2014

The basic idea is to allow merging of key values given a set of strategies, for example:

  • first: duplicate keys in the first resource read are retained, later keys are discarded
  • latest: the opposite of first.
  • append: matching key values are concatenated using a separator (configurable)

An example of such transformer can be seen at https://github.com/griffon/griffon/blob/development/subprojects/gradle-griffon-plugin/src/main/groovy/org/codehaus/griffon/gradle/shadow/transformers/PropertiesFileTransformer.groovy

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Jul 16, 2014

Owner

I like the idea. Want to submit a PR?

Owner

johnrengelman commented Jul 16, 2014

I like the idea. Want to submit a PR?

@johnrengelman johnrengelman added this to the 1.0.3 milestone Jul 16, 2014

aalmiray added a commit to aalmiray/shadow that referenced this issue Jul 16, 2014

Add a PropertiesFileTransformer as suggested in #73
This is a verbatim copy of the class found in the Griffon build.
Please consider these files a starting point for fullfiling the
feature described in #73. The current implementation is good
enough for the uses cases found in Griffon projects, it's likely
to be broad enough to cover all cases, bu one can never tell ;-)

The license governing the shadow-gradle-plugin project has been
applied to the new files :-)
@aalmiray

This comment has been minimized.

Show comment
Hide comment
@aalmiray

aalmiray Jul 16, 2014

Contributor

Done. Ready for your perusal at #74 😄

Contributor

aalmiray commented Jul 16, 2014

Done. Ready for your perusal at #74 😄

johnrengelman added a commit that referenced this issue Jul 16, 2014

Merge pull request #74 from aalmiray/properties_transformer
Add a PropertiesFileTransformer as suggested in #73
@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Jul 16, 2014

Owner

Closed after merging PR.

Owner

johnrengelman commented Jul 16, 2014

Closed after merging PR.

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