Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. configurations {
  2. ftpAntTask
  3. }
  4.  
  5. dependencies {
  6. ftpAntTask("org.apache.ant:ant-commons-net:1.8.4") {
  7. module("commons-net:commons-net:1.4.1") {
  8. dependencies "oro:oro:2.0.8:jar"
  9. }
  10. }
  11. }
  12.  
  13. task ftp << {
  14. ant {
  15. taskdef(name: 'ftp',
  16. classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
  17. classpath: configurations.ftpAntTask.asPath)
  18. ftp(server: "ftp.apache.org", userid: "anonymous", password: "me@myorg.com") {
  19. fileset(dir: "htdocs/manual")
  20. }
  21. }
  22. }
  23.  
  24. > Could not find org.apache.ant:ant-commons-net:1.8.4.
  25.  
  26. buildscript {
  27. repositories {
  28. mavenCentral()
  29. }
  30. dependencies {
  31. classpath 'com.android.tools.build:gradle:0.4'
  32. }
  33. }
  34.  
  35. apply plugin: 'android'
  36.  
  37. dependencies {
  38. compile files('libs/android-support-v4.jar')
  39. }
  40.  
  41. android {
  42. compileSdkVersion 17
  43. buildToolsVersion "17.0.0"
  44.  
  45. defaultConfig {
  46. minSdkVersion 14
  47. targetSdkVersion 17
  48. }
  49.  
  50. signingConfigs {
  51. signed {
  52. storeFile file("(removed)")
  53. storePassword "(removed)"
  54. keyAlias "(removed)"
  55. keyPassword "(removed)"
  56. }
  57. }
  58.  
  59. buildTypes {
  60. signed {
  61. debuggable false
  62. jniDebugBuild false
  63. signingConfig signingConfigs.signed
  64. }
  65. }
  66. }
  67.  
  68. configurations {
  69. ftpAntTask
  70. }
  71.  
  72. dependencies {
  73. ftpAntTask("org.apache.ant:ant-commons-net:1.8.4") {
  74. module("commons-net:commons-net:1.4.1") {
  75. dependencies "oro:oro:2.0.8:jar"
  76. }
  77. }
  78. }
  79.  
  80. task ftp << {
  81. ant {
  82. taskdef(name: 'ftp',
  83. classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
  84. classpath: configurations.ftpAntTask.asPath)
  85. ftp(server: "(removed)", userid: "(removed)", password: "(removed)", remoteDir: "(removed)") {
  86. fileset(dir: "(removed)") {
  87. include(name: "(removed)")
  88. }
  89. }
  90. }
  91. }
  92.  
  93. repositories{
  94. mavenCentral()
  95. }
  96.  
  97. ant {
  98. get(src: "ftp://<hostname>/remote/path/to/file.jar", dest: "/local/path/to/file", username: 'anonymous', password: 'anonymous')
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement