-
Notifications
You must be signed in to change notification settings - Fork 395
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
Introduce keyTransformer property for PropertiesFileTransformer #247
Introduce keyTransformer property for PropertiesFileTransformer #247
Conversation
Very elegant, and I'm really looking forward to seeing this in a release! 😉 |
Thanks @marcphilipp for the PR. I'm still ingesting this, but off the top of my head, I'm thinking I might take this and extend it as a more 1st citizen of the processing engine so that you can register arbitrary actions to execute on each file being processed, or at least a new interface on transformer that allows you to register actions. That could help solve a few other issues that exist. So, I'm not ignoring this, I'm just thinking about it and will be looking for time in my schedule to experiment with a few things. |
@johnrengelman Any news on how to move this forward? |
The new keyTransformer property can be used to transform keys in properties files, e.g. because they contain class names about to be relocated. Its value can be set to a closure that receives the original key and returns the key name to be used in the resulting properties file.
4fcfddb
to
67c01d5
Compare
I've rebased my branch onto master and updated this PR. |
🎉🎉🎉 |
@marcphilipp @sbrannen I merged this changed and pushed a snapshot build to https://oss.jfrog.org/artifactory/plugins-snapshot (2.0.0-SNAPSHOT). |
Thanks @johnrengelman , I will test it right away! Btw. https://projects.ow2.org/bin/view/asm/asm-5-2-is-out with even more bug fixes. It would be great if you upgraded that dependency as well. I guess, it's only 2-times the |
Glad to see the merge... and the snapshot! And an upgrade to ASM 5.2 would top it off. 😉 |
Remove superseded `PropertiesFileTransformer` from `buildSrc` folder; its keyTransformer feature is integrated in Shadow now. For details see: GradleUp/shadow#247
@johnrengelman See linked commit above. It works perfectly now in Java 8 and 9. Now "AssertJ" maven-shading cglib is our next show stopper: https://travis-ci.org/junit-team/junit5/builds/219055181 |
The new keyTransformer property can be used to transform keys in properties files, e.g. because they contain class names about to be relocated. Its value can be set to a closure that receives the original key and returns the key name to be used in the resulting properties file.
We need this for junit-console-launcher because it uses joptsimple by @pholser which we want to relocate to a different package in order to enable users to test code that uses a different version of joptsimple. However, the joptsimple JAR contains properties files that contain keys that are class names.