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

how to avoid gradle processResources from messing with my files #283

Open
rburgst opened this issue May 14, 2018 · 5 comments
Open

how to avoid gradle processResources from messing with my files #283

rburgst opened this issue May 14, 2018 · 5 comments

Comments

@rburgst
Copy link

rburgst commented May 14, 2018

Due to 2.12 now all resource files containing $ will be prone to being filtered. I have a bunch of css / javascript files that I package within my app which causes the build to fail.
Is there a "safe place" in the dir structure where resources will be copied 1:1 without filtering?

@rburgst
Copy link
Author

rburgst commented Jul 20, 2018

no reply?

@aalmiray
Copy link
Member

You have some choices:

  • override the default settings applied by the griffon-gradle-plugin so that resources are filtered in a different way.
  • escape all $ chars that should not be transformed into variables
  • configure a separate resource processing task whose inputs are_not marked as resources in the sourceSet

@rburgst
Copy link
Author

rburgst commented Jul 20, 2018

Where can I find the doc on how to change the plugin config settings?

@aalmiray
Copy link
Member

Documentation on the Griffon plugin can be found at http://griffon-framework.org/guide/2.15.0/#_the_griffon_plugin

For options 1) and 3) you'll have to configure the existing processResources task or create a new task of type ProcessResources or Copy. Refer to the Gradle documentation about these types

Some useful links:

https://docs.gradle.org/current/javadoc/org/gradle/language/jvm/tasks/ProcessResources.html
https://docs.gradle.org/current/userguide/working_with_files.html
https://stackoverflow.com/questions/40774449/gradle-processresources-with-different-replacement-and-renaming-rules

@rburgst
Copy link
Author

rburgst commented Nov 2, 2018

I managed to get it to work with option 2, i.e. I escaped all $ => \$. I tried a bunch of approaches with messing with the Gradle build config but IMHO the code in https://github.com/griffon/griffon/blob/development/subprojects/gradle-griffon-plugin/src/main/groovy/org/codehaus/griffon/gradle/GriffonPlugin.groovy#L91 will pretty much prevent me from reconfiguring the task.

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

No branches or pull requests

2 participants