How do I execute the “hello” task?
`
`
thufir@mordor:~/java$
thufir@mordor:~/java$
thufir@mordor:~/java$ gradle hello
FAILURE: Build failed with an exception.
-
What went wrong:
Task ‘hello’ not found in root project ‘java’. Some candidates are: ‘help’. -
Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 46.385 secs
thufir@mordor:~/java$
thufir@mordor:~/java$ cat gradle.build
apply plugin: ‘java’
archiveBaseName = "HelloWorld"
version = “0.5”
task hello << {
println ‘hello, world’
}
jar {
manifest {
attributes(
‘Class-Path’: configurations.compile.collect { it.getName() }.join(’ ')
‘Main-Class’: ‘HelloWorld’
)
}
}
thufir@mordor:~/java$