Commits

Meikel Brandmeyer committed f868cea

Move subproject build details in dedicated build files

Comments (0)

Files changed (7)

     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.2,1.5)'
-        compile 'org.clojure:tools.nrepl:0.2.0-beta8'
-    }
-
-    uploadArchives {
-        clojarsDeploy()
-    }
-
-    compileClojure.dependsOn compileJava
-}
-
-project(':gradle-plugin') {
-    apply plugin: 'groovy'
-    apply plugin: 'clojure'
-
-    dependencies {
-        compile gradleApi()
-        compile "clojuresque:clojuresque:1.5.0"
-
-        groovy localGroovy()
-    }
-
-    uploadArchives {
-        clojarsDeploy()
-    }
-}
-
-
-project(':nailgun-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(':nailgun-connector') {
-    apply plugin: 'clojure'
-
-    defaultRepositories {
-        flatDir dirs: project(':').file('lib/build')
-        mavenCentral()
-    }
-
-    dependencies {
-        compile 'org.clojure:clojure:[1.2,1.5)'
-        compile project(':server')
-    }
-
-    uploadArchives {
-        clojarsDeploy()
-    }
-
-    compileClojure.dependsOn compileJava
-}
-
-project(':nrepl-client') {
-    task compileHaskell {
-        //inputs.dir project.file('src/main/haskell')
-        //outputs.dir project.file('build/main/classes')
-    } << {
-        project.file("build/main/classes").mkdirs()
-        project.exec {
-            commandLine "ghc", "-isrc/main/haskell",
-                "-outputdir", "build/main/classes",
-                "-o", "build/main/classes/nrepl-client",
-                "-XFlexibleInstances",
-                "--make",
-                "src/main/haskell/VimClojure/Main.hs"
-        }
-    }
-}
-
-project(':vim') {
-    task vimZip(type: Zip) {
-        archiveName = "vimclojure-" + project.version + ".zip"
-        from('src/main/vim') {
-            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('src/main/vim/' + it), '**/*.vim', subDir
-        }
-
-        // The Docs and other text files:
-        [ 'doc', 'ftplugin/clojure' ].each {
-            File subDir = new File(installDir, it)
-            installFiles project.file('src/main/vim/' + it), '**/*.txt', subDir
-        }
-    }
-}
-
 task genCompletions(type: clojuresque.ClojureExec) {
     classpath = project.files(
         project(':server').sourceSets.main.clojure.srcDirs,
         project(':server').sourceSets.main.compileClasspath
     )
 }
+*/

gradle-plugin/build.gradle

+apply plugin: 'groovy'
+apply plugin: 'clojure'
+
+dependencies {
+    compile gradleApi()
+    compile "clojuresque:clojuresque:1.5.0"
+
+    groovy localGroovy()
+}
+
+uploadArchives {
+    clojarsDeploy()
+}

nailgun-client/build.gradle

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

nailgun-connector/build.gradle

+apply plugin: 'clojure'
+
+defaultRepositories {
+    flatDir dirs: project(':').file('lib/build')
+    mavenCentral()
+}
+
+dependencies {
+    compile 'org.clojure:clojure:[1.2,1.5)'
+    compile project(':server')
+}
+
+uploadArchives {
+    clojarsDeploy()
+}
+
+compileClojure.dependsOn compileJava

nrepl-client/build.gradle

+task compileHaskell {
+    //inputs.dir project.file('src/main/haskell')
+    //outputs.dir project.file('build/main/classes')
+} << {
+    project.file("build/main/classes").mkdirs()
+    project.exec {
+        commandLine "ghc", "-isrc/main/haskell",
+            "-outputdir", "build/main/classes",
+            "-o", "build/main/classes/nrepl-client",
+            "-XFlexibleInstances",
+            "--make",
+            "src/main/haskell/VimClojure/Main.hs"
+    }
+}

server/build.gradle

+apply plugin: 'clojure'
+
+defaultRepositories {
+    flatDir dirs: project(':').file('lib/build')
+    mavenCentral()
+}
+
+dependencies {
+    compile 'org.clojure:clojure:[1.2,1.5)'
+    compile 'org.clojure:tools.nrepl:0.2.0-beta8'
+}
+
+uploadArchives {
+    clojarsDeploy()
+}
+
+compileClojure.dependsOn compileJava
+apply plugin: "vim"
+
+task vimZip(type: Zip) {
+    archiveName = "vimclojure-" + project.version + ".zip"
+    from('src/main/vim') {
+        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('src/main/vim/' + it), '**/*.vim', subDir
+    }
+
+    // The Docs and other text files:
+    [ 'doc', 'ftplugin/clojure' ].each {
+        File subDir = new File(installDir, it)
+        installFiles project.file('src/main/vim/' + it), '**/*.txt', subDir
+    }
+}
+
+/*
+task testVim() {
+    ext.workingDir = project.projectDir
+} << {
+    File output = File.createTempFile("test_output_", ".tap", workingDir)
+
+    try {
+        def driver = { test ->
+            return ["set runtimepath+=src/test/vim",
+                    "set runtimepath+=src/main/vim",
+                    "filetype plugin indent on",
+                    "syntax on",
+                    "vimtap#SetOutputFile('${output.path}')",
+                    "source ${test}",
+                    "vimtap#FlushOutput()",
+                   "qall!"].join("\n") + "\n"
+        }
+
+        def InputStream stdin = new java.io.ByteArrayInputStream(
+            driver("test.vim").getBytes("UTF-8")
+        )
+        try {
+            project.exec() {
+                executable    = "vim"
+                args          = [ "-E", "-n", "-N", "-u", "NONE" ]
+                standardInput = stdin
+            }
+        } finally {
+            stdin.close()
+        }
+    } finally {
+        output.delete()
+    }
+}
+
+build.dependsOn testVim
+*/
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.