vimclojure / build.gradle

The default branch has multiple heads

buildscript {
    repositories {
        flatDir dirs: project(':').file('lib/build')
    }
    dependencies {
        classpath "clojuresque:clojuresque:1.4.1"
        classpath "local-dotgradle:local-dotgradle:1.0.0"
    }
}

allprojects {
    localDotGradle = project(':').file("local.gradle").absoluteFile
    apply plugin: 'local-dotgradle'
}

subprojects {
    apply plugin: 'java-base'

    group = 'vimclojure'
    version = '2.4.0-SNAPSHOT'

    defaultTasks 'build'
}

apply plugin: 'clojure'

defaultRepositories {
    clojarsRepo()
}

project(':server') {
    apply plugin: 'clojure'

    defaultRepositories {
        flatDir dirs: project(':').file('lib/build')
        mavenCentral()
    }

    dependencies {
        compile 'org.clojure:clojure:1.+'
    }

    uploadArchives {
        clojarsDeploy()
    }

    compileClojure.dependsOn compileJava
}

project(':gradle') {
    apply plugin: 'groovy'
    apply plugin: 'clojure'

    dependencies {
        compile gradleApi()
        groovy localGroovy()
    }

    uploadArchives {
        clojarsDeploy()
    }
}


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

project(':vim') {
    task vimZip(type: Zip) {
        archiveName = "vimclojure-" + project.version + ".zip"
        from('.') {
            include 'autoload/**/*'
            include 'bin/**/*'
            exclude 'bin/kickoff.sh'
            include 'doc/**/*'
            include 'ftdetect/**/*'
            include 'ftplugin/**/*'
            include 'indent/**/*'
            include 'plugin/**/*'
            include 'syntax/**/*'
        }
        from('..') {
            include 'LICENSE.txt'
            include 'README.markdown'
        }
    }

    // Install the Vim part of the plugin
    def 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 project.file(it), '**/*.vim', subDir
        }

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

task genCompletions(type: clojuresque.ClojureExec) {
    classpath = project.files(
        project(':server').sourceSets.main.clojure.srcDirs,
        project(':server').sourceSets.main.classesDir,
        project(':server').sourceSets.main.compileClasspath
    )
    main = "vimclojure.gencompletions/main"
    args = [
        "clojure.core",
        "clojure.data",
        "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) {
    dependsOn project(':server').classes
    dependsOn project(':server').processResources
    classpath = project.files(
        project(':server').sourceSets.main.clojure.srcDirs,
        project(':server').sourceSets.main.classesDir,
        project(':server').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.