groovy - Can gradle do substitutions as it copies resources? -


For a group of developers, all the differences are stored in a common property file:

  Token1 = some values ​​token2 = 9000 etc. The 'token' is used in a series of XML files located in the General / Main / Resource Directory directory. When Grad files these files in the build directory (and I'm not sure which work is), then is there a chance to execute custom code? Specifically, I want to place the token value in the copy from the attainable property file. In this way, the original copy remains untouched, but there is a desired value for the developer given in the version given in runtime.  

Finally, I know that it can brute force with two or three steps, which then changes the file after it has been copied. I really want to know that to do this in one step Is a great way of

After compilation, Gradle Call Process Processing When copying resources, filtering (or possibly a doLast by adding custom code) can be configured to:

  process processing { Filter org.apache.tools.ant. Filters The two links can provide more help: 


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -