Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. /*
  2. * This project is intended to be used as an acceptance test *and* a
  3. * documentation example. If you change this file, please be sure that it
  4. * renders appropriately in the generated documentation
  5. */
  6. buildscript {
  7. repositories { jcenter() }
  8.  
  9. dependencies {
  10. /* here to make sure that our dependencies get loaded in properly under
  11. * GradleTest, this is NOT needed by end-users
  12. */
  13. classpath 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)'
  14.  
  15. /* Replace "%%VERSION%%" with the version of JRuby/Gradle you wish to
  16. * use if you want to use this build.gradle outside of gradleTest
  17. */
  18. classpath 'com.github.jruby-gradle:jruby-gradle-plugin:1.3.0'
  19. classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:1.1.0'
  20. }
  21. }
  22.  
  23. apply plugin: "com.github.jruby-gradle.jar"
  24.  
  25. repositories { jcenter() }
  26.  
  27. dependencies {
  28. /* Using the built-in `jrubyJar` configuration to describe the
  29. * dependencies our jrubyJar task will need, so the gem is properly
  30. * included in the resulting .jar file
  31. */
  32. jrubyJar "rubygems:colorize:0.7.7+"
  33. jrubyJar 'org.slf4j:slf4j-simple:1.7.12'
  34. jrubyJar 'com.sparkjava:spark-core:2.5'
  35. }
  36.  
  37. jrubyJar {
  38. /* We want to use this Ruby script as our start point when the jar executes
  39. */
  40. initScript "script.rb"
  41. }
  42.  
  43.  
  44. /*
  45. * This task is only here for the execution fo the gradleTest
  46. */
  47. task runGradleTest(type: Exec) {
  48. dependsOn jrubyJar
  49. description "Execute the constructed self-executing jar"
  50. environment [:]
  51. workingDir "${buildDir}/libs"
  52. commandLine 'java', '-jar', jrubyJar.outputs.files.singleFile.absolutePath
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement