/build.gradle
Gradle | 83 lines | 60 code | 20 blank | 3 comment | 0 complexity | 51892658988d3c3b0d3d4c7dd2d00964 MD5 | raw file
- usePlugin 'clojure'
- group = 'vimclojure'
- version = '2.2.0-SNAPSHOT'
- aotCompile = false
- gradleHomeRepo repositories
- clojureSnapshotsRepo repositories
- repositories {
- mavenCentral()
- }
- configurations {
- clojure {
- visible = false
- description = 'Compile only configuration for clojure'
- }
- }
- dependencies {
- clojure 'org.clojure:clojure:1.0.0'
- }
- sourceSets.main.compileClasspath = configurations.clojure
- compileClojure.dependsOn compileJava
- defaultTasks 'build'
- configureClojarsDeploy(uploadArchives)
- // 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 (hasProperty('vimdir')) {
- installDir = new File(vimdir)
- } else if (System.getProperty('os.name').toLowerCase().startsWith("win")) {
- installDir = new File(System.getProperty('user.home') + "/vimfiles")
- } else {
- installDir = new File(Systm.getProperty('user.home') + "/.vim")
- }
- // The Vim files:
- [ 'autoload', 'indent', 'syntax', 'ftdetect', 'ftplugin' ].each {
- File subDir = new File(installDir, it)
- installFiles it, '**/*.vim', subDir
- }
- // The Docs and other text files:
- [ 'doc', 'ftplugin/clojure' ].each {
- File subDir = new File(installDir, it)
- installFiles it, '**/*.txt', subDir
- }
- }
- task runNailgun(dependsOn: classes) << {
- Map args = [
- classname: 'com.martiansoftware.nailgun.NGServer',
- failOnError: true,
- fork: true,
- classpathref: 'nailgun.classpath'
- ]
- ant.path(id: 'nailgun.classpath') {
- sourceSets.main.clojure.srcDirs.each { pathelement location: it }
- pathelement location: sourceSets.main.classesDir.path
- configurations.clojure.each { pathelement location: it }
- }
- ant.java(args) { arg value: '127.0.0.1' }
- }