Cuando actualicé la versión de kotlin de 1.5.30 a 1.6.0, la tarea de compilar kotlindebug y kapt consumía mucho tiempo y solo faltaban tres minutos. Obtengo el registro de compilación usando --info. Esta parte se llama miles de veces y toma alrededor de 3 minutos, mientras que 1.5.30 no tiene este problema.
file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\src\main\kotlin', not found file or directory 'F:\ProjectSample\android\sdk\build-types\debug\java', not found file or directory 'F:\ProjectSample\android\sdk\build\generated\renderscript_source_output_dir\debug\out', not found
Hay una regresión conocida en la velocidad de compilación para los proyectos de Android introducidos en Kotlin 1.6.0
, consulte KT-49910 . ¿Quizás eso es lo que te afecta?
También hay una solución proporcionada en el problema anterior, a saber:
buildscript { dependencies { // Must go before the real KGP plugin! classpath("dev.zacsweers:kgp-160-patcher:1.0.0") } }
Esto se solucionará en la próxima versión 1.6.10
.