Код: Выделить всё
Kotlin Version = "1.8.20"
Hilt Version = "2.45"
Compose BOM Version = "2023.01.00"
Compose Compiler Version = "1.4.3"
com.android.library = "7.4.1"
com.android.application = "7.4.1"
Код: Выделить всё
buildscript {
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'com.google.dagger.hilt.android' version '2.45' apply false
}
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
if (project.findProperty("myapp.enableComposeCompilerReports") == "true") {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
]
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
]
}
}
}
}
Код: Выделить всё
Multiple values are not allowed for plugin option androidx.compose.compiler.plugins.kotlin:reportsDestination
Plugin "androidx.compose.compiler.plugins.kotlin" usage:
liveLiterals Enable Live Literals code generation
liveLiteralsEnabled
Enable Live Literals code generation (with per-file enabled flags)
generateFunctionKeyMetaClasses
Generate function key meta classes with annotations indicating the functions and their group keys. Generally used for tooling.
sourceInformation
Include source information in generated code
metricsDestination
Save compose build metrics to this folder
reportsDestination Save compose build reports to this folder
intrinsicRemember
Include source information in generated code
suppressKotlinVersionCompatibilityCheck
Suppress Kotlin version compatibility check
generateDecoys
Generate decoy methods in IR transform
Если вы добавите плагин kapt, вы столкнетесь с этой проблемой.
Добавьте идентификатор 'org.jetbrains.kotlin.kapt' версии '1.8.10', примените false к build.gradle верхнего уровня
Добавить идентификатор 'org.jetbrains.kotlin.kapt' в build.gradle приложения
Запустите ./gradlew assembleDebug -Pmyapp.enableComposeCompilerReports=true
И проблема будет воспроизведена без добавления каких-либо зависимостей Hilt.
Подробнее здесь: https://stackoverflow.com/questions/755 ... piler-plug
Мобильная версия