Support fileAccessHistoryReportFile in KAPT

This change expanded KAPT to support a new param
'fileAccessHistoryReportFile', which reports all the classes used during
 annotation processing into a file, in the form of a list of URIs.

This is useful for build speed improvements described in https://engineering.fb.com/2017/11/09/android/rethinking-android-app-compilation-with-buck/.
Essentially, using the list of used classes, we can compile only
the dependencies that are really affected by the developer's
code changes and improve Kotlin build speed.

^KT-52853
This commit is contained in:
Jingbo Yang
2022-06-17 16:27:16 -04:00
committed by Space Team
parent 1b49ae3aab
commit 7a13173e6a
8 changed files with 145 additions and 22 deletions
@@ -128,6 +128,7 @@ class Kapt3CommandLineProcessor : CommandLineProcessor {
SHOW_PROCESSOR_STATS -> setFlag(KaptFlag.SHOW_PROCESSOR_STATS, value)
DUMP_PROCESSOR_STATS -> processorsStatsReportFile = File(value)
DUMP_FILE_READ_HISTORY -> fileReadHistoryReportFile = File(value)
INCLUDE_COMPILE_CLASSPATH -> setFlag(KaptFlag.INCLUDE_COMPILE_CLASSPATH, value)
DETECT_MEMORY_LEAKS_OPTION -> setSelector(enumValues<DetectMemoryLeaksMode>(), value) { detectMemoryLeaks = it }