Piotr Krzemiński
04/13/2023, 8:09 AM* What went wrong:
Could not determine the dependencies of null.
> Could not resolve all dependencies for configuration ':buildSrc:buildScriptClasspath'.
> Could not create task ':buildSrc:compileKotlin'.
> Failed to query the value of property 'freeCompilerArgs'.
> Querying the mapped value of map(flatmap(provider(task 'generatePrecompiledScriptPluginAccessors', class org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.GeneratePrecompiledScriptPluginAccessors))) before task ':buildSrc:generatePrecompiledScriptPluginAccessors' has completed is not supported
I presume it’s regarding one of these usages of freeCompilerArgs
, but I don’t understand the error message. Anyone has a clue why it becomes a problem starting from 8.1?Adam S
04/13/2023, 8:28 AMtasks.withType<KotlinCompile>().configureEach {
compilerOptions {
freeCompilerArgs.addAll(
"-opt-in=kotlin.time.ExperimentalTime",
)
}
}
Compile tasks have the newinput, which is similar to the existingcompilerOptions
but useskotlinOptions
from the Gradle Properties API as the return typeProperty
freeCompilerArgs
is empty, so freeCompilerArgs += ...
will fail.Piotr Krzemiński
04/13/2023, 8:47 AM