When I upgraded the kotlin version from 1.5.30 to 1.6.0, the task of the compilekotlindebug task and kapt was time-consuming, and it was only three minutes away. I get the builid log by using --info. This part gets called thousands of time and take about 3 mins, while 1.5.30 do not have this problem.
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
There is a known regression in compilation speed for Android projects introduced in Kotlin 1.6.0, see KT-49910.
Maybe that's what you're affected by?
There also is a workaround provided in the above issue, namely:
buildscript {
dependencies {
// Must go before the real KGP plugin!
classpath("dev.zacsweers:kgp-160-patcher:1.0.0")
}
}
This will be fixed in the upcoming release 1.6.10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With