thufir

Untitled

Jan 30th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. thufir@mordor:~/java$
  2. thufir@mordor:~/java$ cat build.gradle
  3. apply plugin: 'java'
  4.  
  5. archiveBaseName = "HelloWorld"
  6. version = "0.5"
  7.  
  8.  
  9. task hello << {
  10. println 'hello, world'
  11. }
  12.  
  13.  
  14.  
  15. jar {
  16. manifest {
  17. attributes(
  18. 'Class-Path': configurations.compile.collect { it.getName() }.join(' ')
  19. 'Main-Class': 'HelloWorld'
  20. )
  21. }
  22. }
  23. thufir@mordor:~/java$
  24. thufir@mordor:~/java$ gradle tasks
  25.  
  26. FAILURE: Build failed with an exception.
  27.  
  28. * Where:
  29. Build file '/home/thufir/java/build.gradle' line: 17
  30.  
  31. * What went wrong:
  32. Could not compile build file '/home/thufir/java/build.gradle'.
  33. > startup failed:
  34. build file '/home/thufir/java/build.gradle': 17: unexpected token: Main-Class @ line 17, column 7.
  35. 'Main-Class': 'HelloWorld'
  36. ^
  37.  
  38. 1 error
  39.  
  40.  
  41. * Try:
  42. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  43.  
  44. BUILD FAILED
  45.  
  46. Total time: 3.976 secs
  47. thufir@mordor:~/java$
Advertisement
Add Comment
Please, Sign In to add comment