[英]kotlin-gradle-plugin 1.6.0 build slow
當我把kotlin版本從1.5.30升級到1.6.0的時候,compilekotlindebug任務和kapt的任務比較耗時,只需要三分鍾。 我使用 --info 獲取構建日志。 這部分被調用了數千次,大約需要 3 分鍾,而 1.5.30 沒有這個問題。
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
Kotlin 1.6.0
中引入的 Android 項目的編譯速度存在已知的回歸,請參見KT-49910 。 也許這就是你受到的影響?
上述問題中還提供了一種解決方法,即:
buildscript {
dependencies {
// Must go before the real KGP plugin!
classpath("dev.zacsweers:kgp-160-patcher:1.0.0")
}
}
這將在即將發布的1.6.10
中修復。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.