Hi there.
Trying to make some property files for a system, based on replacing relatively few properties in a number of files for test, production, etc.
For that purpose I created a small task:
task filterProperties(type: Zip) {
from fileTree('SystemPropertyFiles')
archiveName "Config-${env}.zip"
def properties= new Properties()
file(configFile).withInputStream {
properties.load(it);
}
expand(properties)
}
All worked well until a 350 KB XML file came along and Gradle failed with the error:
SimpleTemplateScript61.groovy: 1: String too long. The given string is 343682 Unicode code units long, but only a maximum of 65535 is allowed.
64 K seems like a thing of a distant past - is this issue being worked on? It’s really a great feature to filter files like this in Gradle, and I’d hate to go back to Ant for this!
Is there an easy work-around - e.g. filtering files line-by-line?