A syntax error in my Gradle build script gives the wrong line number (line 148 when the build script only has 7 lines).
robert@pferdeapfel:~/hrsn> gradle
FAILURE: Build failed with an exception.
- Where:
Build file ‘/Users/robert/hrsn/build.gradle’ line: 148
- What went wrong:
Could not compile build file ‘/Users/robert/hrsn/build.gradle’.
startup failed:
build file ‘/Users/robert/hrsn/build.gradle’: 148: expecting ‘}’, found ‘’ @ line 148, column 1.
1 error
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.981 secs
robert@pferdeapfel:~/hrsn> wc -l build.gradle
7 build.gradle
robert@pferdeapfel:~/hrsn> gradle --version
Gradle 2.0
Build time:
2014-07-01 07:45:34 UTC
Build number: none
Revision:
b6ead6fa452dfdadec484059191eb641d817226c
Groovy:
2.3.3
Ant:
Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM:
1.7.0_21 (Oracle Corporation 23.21-b01)
OS:
Mac OS X 10.8.5 x86_64
Below is the build script to reproduce the problem:
task deploy(type: Copy) {
from “file1”
// oops, } missing
task deployWebtest(type: Copy) {
from “file2”
}
Robert