PageRenderTime 53ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/build.gradle

https://github.com/jondistad/vimclojure
Gradle | 83 lines | 60 code | 20 blank | 3 comment | 0 complexity | 51892658988d3c3b0d3d4c7dd2d00964 MD5 | raw file
  1. usePlugin 'clojure'
  2. group = 'vimclojure'
  3. version = '2.2.0-SNAPSHOT'
  4. aotCompile = false
  5. gradleHomeRepo repositories
  6. clojureSnapshotsRepo repositories
  7. repositories {
  8. mavenCentral()
  9. }
  10. configurations {
  11. clojure {
  12. visible = false
  13. description = 'Compile only configuration for clojure'
  14. }
  15. }
  16. dependencies {
  17. clojure 'org.clojure:clojure:1.0.0'
  18. }
  19. sourceSets.main.compileClasspath = configurations.clojure
  20. compileClojure.dependsOn compileJava
  21. defaultTasks 'build'
  22. configureClojarsDeploy(uploadArchives)
  23. // Install the Vim part of the plugin
  24. void installFiles(File directory, String pattern, File destination) {
  25. destination.mkdirs()
  26. ant.copy(todir: destination) {
  27. fileset dir: directory, includes: pattern
  28. }
  29. }
  30. task installVim << {
  31. File installDir
  32. if (hasProperty('vimdir')) {
  33. installDir = new File(vimdir)
  34. } else if (System.getProperty('os.name').toLowerCase().startsWith("win")) {
  35. installDir = new File(System.getProperty('user.home') + "/vimfiles")
  36. } else {
  37. installDir = new File(Systm.getProperty('user.home') + "/.vim")
  38. }
  39. // The Vim files:
  40. [ 'autoload', 'indent', 'syntax', 'ftdetect', 'ftplugin' ].each {
  41. File subDir = new File(installDir, it)
  42. installFiles it, '**/*.vim', subDir
  43. }
  44. // The Docs and other text files:
  45. [ 'doc', 'ftplugin/clojure' ].each {
  46. File subDir = new File(installDir, it)
  47. installFiles it, '**/*.txt', subDir
  48. }
  49. }
  50. task runNailgun(dependsOn: classes) << {
  51. Map args = [
  52. classname: 'com.martiansoftware.nailgun.NGServer',
  53. failOnError: true,
  54. fork: true,
  55. classpathref: 'nailgun.classpath'
  56. ]
  57. ant.path(id: 'nailgun.classpath') {
  58. sourceSets.main.clojure.srcDirs.each { pathelement location: it }
  59. pathelement location: sourceSets.main.classesDir.path
  60. configurations.clojure.each { pathelement location: it }
  61. }
  62. ant.java(args) { arg value: '127.0.0.1' }
  63. }