diff options
author | Yaroslav <contact@yaroslavps.com> | 2019-09-05 19:35:38 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2019-09-05 19:35:38 +0300 |
commit | 212dcd0bf753f08c0127a26a71b673c734b45c02 (patch) | |
tree | 4a43e43c7c9b9ccfcaef4088ba9e5f52154994b5 /.vim/autoload/neomake/makers/ft/java | |
download | vimrice-212dcd0bf753f08c0127a26a71b673c734b45c02.tar.gz vimrice-212dcd0bf753f08c0127a26a71b673c734b45c02.zip |
init commit, extracted vim config from i3rice
Diffstat (limited to '.vim/autoload/neomake/makers/ft/java')
-rw-r--r-- | .vim/autoload/neomake/makers/ft/java/classpath.gradle | 46 | ||||
-rw-r--r-- | .vim/autoload/neomake/makers/ft/java/classpath.py | 15 |
2 files changed, 61 insertions, 0 deletions
diff --git a/.vim/autoload/neomake/makers/ft/java/classpath.gradle b/.vim/autoload/neomake/makers/ft/java/classpath.gradle new file mode 100644 index 0000000..f548c0d --- /dev/null +++ b/.vim/autoload/neomake/makers/ft/java/classpath.gradle @@ -0,0 +1,46 @@ +task classpath << { + + String finalFileContents = "" + HashSet<String> classpathFiles = new HashSet<String>() + for (proj in allprojects) { + + def exploded = proj.getBuildDir().absolutePath + File.separator + "intermediates" + File.separator + "exploded-aar" + def listFiles = new File(exploded) + if (listFiles.exists()) { + listFiles.eachFileRecurse(){ file -> + if (file.name.endsWith(".jar")){ + classpathFiles += file + } + } + } + + def rjava = proj.getBuildDir().absolutePath + File.separator + "intermediates" + File.separator + "classes" + File.separator + "debug" + def rFiles = new File(rjava) + if (rFiles.exists()) { + classpathFiles += rFiles + } + + for (conf in proj.configurations) { + for (dependency in conf) { + if (dependency.name.endsWith("aar")){ + } else { + classpathFiles += dependency + } + } + } + if (proj.hasProperty("android")){ + classpathFiles += proj.android.bootClasspath + } + + if (proj.hasProperty("sourceSets")) { + + for (srcSet in proj.sourceSets) { + for (dir in srcSet.java.srcDirs) { + classpathFiles += dir.absolutePath + } + } + } + } + def paths = classpathFiles.join(File.pathSeparator) + println "CLASSPATH:" + paths +} diff --git a/.vim/autoload/neomake/makers/ft/java/classpath.py b/.vim/autoload/neomake/makers/ft/java/classpath.py new file mode 100644 index 0000000..5a7ea8d --- /dev/null +++ b/.vim/autoload/neomake/makers/ft/java/classpath.py @@ -0,0 +1,15 @@ +import os +from xml.etree.ElementTree import * + + +def ReadClasspathFile(fn): + cp = [] + for a in parse(fn).findall('classpathentry'): + kind = a.get('kind') + if kind == 'src' and 'output' in a.keys(): + cp.append(os.path.abspath(a.get('output'))) + elif kind == 'lib' and 'path' in a.keys(): + cp.append(os.path.abspath(a.get('path'))) + elif kind == 'output' and 'path' in a.keys(): + cp.append(os.path.abspath(a.get('path'))) + return cp |