Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. apply plugin: 'java'
  2. apply plugin: 'idea'
  3. apply plugin: 'application'
  4.  
  5.  
  6. mainClassName = "si.prmejc.washer.WasherRunner"
  7.  
  8. repositories {
  9. mavenCentral()
  10. }
  11.  
  12. dependencies {
  13. compile group: 'com.pi4j', name:'pi4j-core', version: '1.0'
  14. compile group: 'com.sparkjava', name:'spark-core', version: '2.4'
  15. compile group: 'org.json', name:'json', version: '20160212'
  16. }
  17.  
  18. buildscript {
  19. repositories {
  20. mavenCentral()
  21. maven { url "http://repo.spring.io/libs-release" }
  22. mavenLocal()
  23. }
  24.  
  25. dependencies {
  26. classpath('org.hidetake:gradle-ssh-plugin:2.4.0')
  27. }
  28. }
  29.  
  30. apply plugin: 'org.hidetake.ssh'
  31.  
  32.  
  33. installApp{
  34. from('/public'){
  35. into('/bin/public')
  36. }
  37. }
  38.  
  39.  
  40.  
  41. task deployToServer(dependsOn: ':installApp') << {
  42. ssh.run {
  43. remotes {
  44. selectedServer {
  45. host = '192.168.3.156'
  46. user = 'pi'
  47. password = 'raspberry'
  48. }
  49. }
  50. session(remotes.selectedServer) {
  51. put from: 'build/install/washer/bin', into: '/home/pi/test'
  52. put from: 'build/install/washer/lib', into: '/home/pi/test'
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement