title: Gradle: Could not expand ZIP because of file name too long
body: <p>I am using <code>Ubuntu 14.04</code> and <code>ext4</code> file system, which does not allow file names longer than 143 characters. There is a dependency that causes a problem due to a long file name. Here are more details:</p>
  
  <pre><code>* Exception is:
  org.gradle.api.tasks.TaskExecutionException: Execution failed for task {task-name}
  at ...
  Caused by: org.gradle.api.GradleException: Could not expand ZIP '/home/{username}/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.3.2.RELEASE/dbd3d19d62e588b7fd495e8a3071ff076d0f74d5/spring-boot-autoconfigure-1.3.2.RELEASE.jar'.
  at ...
  Caused by: org.gradle.api.GradleException: Could not copy zip entry /home/{username}/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.3.2.RELEASE/dbd3d19d62e588b7fd495e8a3071ff076d0f74d5/spring-boot-autoconfigure-1.3.2.RELEASE.jar!org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverAutoConfiguration$DeviceDelegatingViewResolverConfiguration$ThymeleafViewResolverViewResolverDelegateConfiguration.class to '/home/{username}/{path-to-project}/build/tmp/expandedArchives/spring-boot-autoconfigure-1.3.2.RELEASE.jar_b7o429q11e8neo97xwl2h3jny/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverAutoConfiguration$DeviceDelegatingViewResolverConfiguration$ThymeleafViewResolverViewResolverDelegateConfiguration.class'.
  at ... 
  Caused by: java.io.FileNotFoundException: /home/{userame}/{path-to-project}/build/tmp/expandedArchives/spring-boot-autoconfigure-1.3.2.RELEASE.jar_b7o429q11e8neo97xwl2h3jny/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverAutoConfiguration$DeviceDelegatingViewResolverConfiguration$ThymeleafViewResolverViewResolverDelegateConfiguration.class (File name too long)
  </code></pre>
  
  <p>Gradle version is <code>2.12</code>. Some other questions suggested changing the <code>GRADLE_USER_HOME</code> variable to point to a unencrypted location, but it seems that my whole system is encrypted and therefore does not support names longer than 143 characters.</p>
  
  <p>Is there any workaround?</p>