Adjust build report verbosity
This commit is contained in:
@@ -21,14 +21,13 @@ import java.io.File
|
||||
|
||||
interface ICReporter {
|
||||
fun report(message: () -> String)
|
||||
fun reportVerbose(message: () -> String)
|
||||
|
||||
// used in Gradle plugin
|
||||
@Suppress("unused")
|
||||
fun reportCompileIteration(sourceFiles: Collection<File>, exitCode: ExitCode) {}
|
||||
fun reportCompileIteration(incremental: Boolean, sourceFiles: Collection<File>, exitCode: ExitCode) {}
|
||||
|
||||
fun pathsAsString(files: Iterable<File>): String =
|
||||
files.joinToString { it.canonicalPath }
|
||||
files.joinToString { it.canonicalPath }
|
||||
|
||||
fun pathsAsString(vararg files: File): String =
|
||||
pathsAsString(files.toList())
|
||||
pathsAsString(files.toList())
|
||||
}
|
||||
@@ -130,7 +130,7 @@ fun ChangesCollector.getDirtyData(
|
||||
val dirtyClassesFqNames = HashSet<FqName>()
|
||||
|
||||
for (change in changes()) {
|
||||
reporter.report { "Process $change" }
|
||||
reporter.reportVerbose { "Process $change" }
|
||||
|
||||
if (change is ChangeInfo.SignatureChanged) {
|
||||
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
|
||||
@@ -190,7 +190,7 @@ fun mapClassesFqNamesToFiles(
|
||||
val srcFile = cache.getSourceFileIfClass(dirtyClassFqName)
|
||||
if (srcFile == null || srcFile in excludes || srcFile.isJavaFile()) continue
|
||||
|
||||
reporter.report { ("Class $dirtyClassFqName caused recompilation of: ${reporter.pathsAsString(srcFile)}") }
|
||||
reporter.report { "Class $dirtyClassFqName caused recompilation of: ${reporter.pathsAsString(srcFile)}" }
|
||||
dirtyFiles.add(srcFile)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user