Skip to content

Commit acaa155

Browse files
author
David Haxton
committed
Remove bad assumptions about how bazel works
1 parent 9e2e2a2 commit acaa155

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/java/io/bazel/rulesscala/coverage/instrumenter/JacocoInstrumenter.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ private void processArg(Instrumenter jacoco, String arg) throws Exception {
7070
throw new RuntimeException(e);
7171
}
7272
});
73+
74+
Files.write(
75+
outFS.getPath("-paths-for-coverage.txt"),
76+
srcs.replace(",", "\n").getBytes(java.nio.charset.StandardCharsets.UTF_8)
77+
);
7378
}
7479
}
7580

@@ -99,13 +104,6 @@ private FileVisitResult actuallyVisitFile(Path inPath, BasicFileAttributes attrs
99104
} else {
100105
Files.copy(inPath, outPath);
101106
}
102-
103-
if(outPath.toString().endsWith(".class")) {
104-
Files.write(
105-
outFS.getPath((outPath.toString() + "-paths-for-coverage.txt")),
106-
srcs.replace(",", "\n").getBytes(java.nio.charset.StandardCharsets.UTF_8)
107-
);
108-
}
109107
return FileVisitResult.CONTINUE;
110108
}
111109
};

0 commit comments

Comments
 (0)