Gradle无法在项目构建中复制二进制文件资源(jpg)

时间:2017-09-19 21:52:20

标签: gradle

我已将Spring Boot测试所需的二进制映像包含在/src/main/resources/img/CEO.jpg

当我尝试构建项目时(" gradle build")我收到此错误:

Caused by: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
SimpleTemplateScript29.groovy: 1: illegal string body character after dollar sign;
   solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 1, column 10.
   out.print("""����JFIF��(ExifMMV(1f�in�HHPicasa�0220����ޤ !�e7877ee2da2aa6570000000000000000R980100J(Z�HH����JFIF��C

就好像文件的二进制内容正在与Gradle混淆,因为它试图复制它,就好像它是执行"等级构建时的文本一样#34;命令。没有这个文件一切正常(我已尝试过其他二进制文件,但都失败了)。似乎Gradle只处理文本文件。我错过了什么吗?

0 个答案:

没有答案