Usage of groovy SimpleTemplateEngine causes failures in gradle parsing long scripts in dependencies.gradle


We suffer from the issue related to usage of SimpleTemplateEngine in Gradle which is known by Groovy but not resolved yet.

Details: we migrate from ant to gradle and provide some additional functionality for developers: we create a full description of dependencies with additional properties like optional, preferred etc and transitive dependencies together with information about repositories. If project contains too many dependencies, this description can be large the 64k.

And when we get error :

script ‘project_name/dependencies.gradle’: 160: String too long. The given string is 95787 Unicode code units long, but only a maximum of 65535 is allowed.

Gradle is unable to parse it due to restrictions in SimpleTemplateEngine and build fails.

We’ve tried to recompile Gradle with GroovyStreamingTemplateEngine ( and this is resolved our problem.

Could you please consider it as replacement of SimpleTemplateEngine? If needed we can provide changes which we made in gradle (we use version 1.11)

Best regards,


Which usage of SimpleTemplateEngine in Gradle are you referring to?

Hi, Peter,

It was my fault, it’s only groovy issue and not a gradle one.

We will try gradle 2.0 with the newer version of groovy to see if it solves the problem.