vimclojure / build.gradle

The default branch has multiple heads

apply plugin: 'clojure'

group = 'vimclojure'
version = '2.2.0-SNAPSHOT'

repositories {
    clojureReleasesRepo()
}

dependencies {
    development 'org.clojure:clojure:1.1.0'
}

compileClojure.dependsOn compileJava

defaultTasks 'build'

task vimZip(type: Zip) {
    from('.') {
        include 'autoload/**/*'
        include 'bin/**/*'
        exclude 'bin/kickoff.sh'
        include 'doc/**/*'
        include 'ftdetect/**/*'
        include 'ftplugin/**/*'
        include 'indent/**/*'
        include 'plugin/**/*'
        include 'syntax/**/*'
        include 'LICENSE.txt'
        include 'README.txt'
    }
}

task nailgunClientZip(type: Zip) {
    archiveName = "vimclojure-nailgun-client.zip"
    into("vimclojure-nailgun-client") {
        from('.') {
            include "ngclient/**/*"
            include "Makefile"
            include "ng.exe"
        }
    }
}

// Install the Vim part of the plugin
void installFiles(File directory, String pattern, File destination) {
    destination.mkdirs()
    ant.copy(todir: destination) {
        fileset dir: directory, includes: pattern
    }
}

task installVim << {
    File installDir

    if (project.hasProperty('vimdir')) {
        installDir = new File(project.vimdir)
    } else if (System.getProperty('os.name').toLowerCase().startsWith("win")) {
        installDir = new File(System.getProperty('user.home') + "/vimfiles")
    } else {
        installDir = new File(System.getProperty('user.home') + "/.vim")
    }

    // The Vim files:
    [ 'autoload', 'indent', 'syntax', 'ftdetect', 'ftplugin', 'plugin' ].each {
        File subDir = new File(installDir, it)
        installFiles file(it), '**/*.vim', subDir
    }

    // The Docs and other text files:
    [ 'doc', 'ftplugin/clojure' ].each {
        File subDir = new File(installDir, it)
        installFiles file(it), '**/*.txt', subDir
    }
}

task genCompletions(type: JavaExec.class) {
    classpath = project.files(
        sourceSets.main.clojure.sourceDir,
        sourceSets.main.classesDir,
        sourceSets.main.compileClasspath
    )
    main = "clojure.main"
    args = [ "-e", "(require 'vimclojure.gencompletions)", "-e",
        "(vimclojure.gencompletions/main " +
            "'clojure.core " +
            "'clojure.inspector " +
            "'clojure.java.browse 'clojure.java.browse-ui 'clojure.java.io 'clojure.java.javadoc 'clojure.java.shell " +
            "'clojure.main " +
            "'clojure.pprint " +
            "'clojure.repl " +
            "'clojure.set " +
            "'clojure.stacktrace " +
            "'clojure.string " +
            "'clojure.template " +
            "'clojure.test 'clojure.test.tap 'clojure.test.junit " +
            "'clojure.walk " +
            "'clojure.xml " +
            "'clojure.zip)"
    ]
}

task runNailgun(type: JavaExec.class, dependsOn: classes) {
    classpath = project.files(
        sourceSets.main.clojure.sourceDir,
        sourceSets.main.classesDir,
        sourceSets.main.compileClasspath
    )
    main = 'vimclojure.nailgun.NGServer'
    args = [ '127.0.0.1' ]
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.