From 7217c7749e5403c9c7856c1d12c7986eb9c3b460 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Tue, 31 Mar 2020 17:52:49 +0300 Subject: Goodbye vim, been using neovim for ages now; home directory cleanup --- .../neomake/makers/ft/java/classpath.gradle | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 dotfiles/.local/share/nvim/site/autoload/neomake/makers/ft/java/classpath.gradle (limited to 'dotfiles/.local/share/nvim/site/autoload/neomake/makers/ft/java/classpath.gradle') diff --git a/dotfiles/.local/share/nvim/site/autoload/neomake/makers/ft/java/classpath.gradle b/dotfiles/.local/share/nvim/site/autoload/neomake/makers/ft/java/classpath.gradle new file mode 100644 index 0000000..f548c0d --- /dev/null +++ b/dotfiles/.local/share/nvim/site/autoload/neomake/makers/ft/java/classpath.gradle @@ -0,0 +1,46 @@ +task classpath << { + + String finalFileContents = "" + HashSet classpathFiles = new HashSet() + 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 +} -- cgit v1.2.3