Bare with me. I know Macs don’t have drive letters, but the path “c:/Program Files” is valid on a Mac.
The following Gradle code fails:
// This code fails.
x = file("c:/Program Files")
println x.getAbsolutePath();
With this error:
FAILURE: Build failed with an exception. > >* Where: >Build file ‘/Users/jzwolak/files/experimenting/gradle/spaces/build.gradle’ line: 2 > >* What went wrong: >A problem occurred evaluating root project ‘spaces’. >> java.net.URISyntaxException: Illegal character in path at index 10: c:/Program Files > >* Try: >Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. > >BUILD FAILED
For this Gradle version:
------------------------------------------------------------ Gradle 1.8 ------------------------------------------------------------
Build time:
2013-09-24 07:32:33 UTC Build number: none Revision:
7970ec3503b4f5767ee1c1c69f8b4186c4763e3d
Groovy:
1.8.6 Ant:
Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:
2.2.0 JVM:
1.7.0_10 (Oracle Corporation 23.6-b04) OS:
Mac OS X 10.8.5 x86_64