|
4 | 4 |
|
5 | 5 | import io.bazel.rulesscala.io_utils.StreamCopy; |
6 | 6 | import io.bazel.rulesscala.jar.JarCreator; |
| 7 | +import io.bazel.rulesscala.jdeps.JdepsWriter; |
7 | 8 | import io.bazel.rulesscala.worker.Worker; |
8 | | -import java.io.*; |
9 | | -import java.nio.file.*; |
| 9 | +import java.io.File; |
| 10 | +import java.io.FileOutputStream; |
| 11 | +import java.io.IOException; |
| 12 | +import java.io.InputStream; |
| 13 | +import java.io.OutputStream; |
| 14 | +import java.nio.file.FileVisitResult; |
| 15 | +import java.nio.file.Files; |
| 16 | +import java.nio.file.Path; |
| 17 | +import java.nio.file.Paths; |
| 18 | +import java.nio.file.SimpleFileVisitor; |
10 | 19 | import java.nio.file.attribute.BasicFileAttributes; |
11 | 20 | import java.util.ArrayList; |
12 | 21 | import java.util.Arrays; |
@@ -61,6 +70,8 @@ public void work(String[] args) throws Exception { |
61 | 70 | compileScalaSources(ops, scalaSources, classes); |
62 | 71 | } |
63 | 72 |
|
| 73 | + JdepsWriter.write(ops.jdepsFilePath, ops.currentTarget, ops.classpath); |
| 74 | + |
64 | 75 | /** Copy the resources */ |
65 | 76 | copyResources(ops.resourceSources, ops.resourceTargets, classes); |
66 | 77 |
|
@@ -95,7 +106,7 @@ private static String[] collectSrcJarSources( |
95 | 106 | } |
96 | 107 |
|
97 | 108 | private static List<File> filterFilesByExtension(List<File> files, String extension) { |
98 | | - List<File> filtered = new ArrayList<File>(); |
| 109 | + List<File> filtered = new ArrayList<>(); |
99 | 110 | for (File f : files) { |
100 | 111 | if (f.toString().endsWith(extension)) { |
101 | 112 | filtered.add(f); |
@@ -238,7 +249,7 @@ private static String[] getPluginParamsFrom(CompileOptions ops) { |
238 | 249 | } |
239 | 250 |
|
240 | 251 | private static void compileScalaSources(CompileOptions ops, String[] scalaSources, Path classes) |
241 | | - throws IllegalAccessException, IOException { |
| 252 | + throws IOException { |
242 | 253 |
|
243 | 254 | String[] pluginArgs = buildPluginArgs(ops.plugins); |
244 | 255 | String[] pluginParams = getPluginParamsFrom(ops); |
|
0 commit comments