Hakan Mehmed
12/19/2024, 7:29 AMcompileTaskProvider: TaskProvider<KotlinCompilationTask>
(https://github.com/JetBrains/kotlin/blob/898f6c0c6988323fb081a5c90d2ea8af56c7f878/[…]/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinCompilation.kt) in the DSL for the kotlin compilations.
Is there any specific reason for exposing a TaskProvider for users instead of some custom dsl block? We in AGP havent had a great experience by exposing task providers before as it leaks task abstractions to the API surface as well as can potentially be misused however wanted to get you view on the reasoning for having a TaskProvider on the API.Hakan Mehmed
12/19/2024, 7:30 AMtapchicoma
12/19/2024, 9:39 AMKotlinCompilationTask
is a official API here.
What is your exact concerns with it?Hakan Mehmed
12/19/2024, 10:41 AMAnton Lakotka [JB]
12/19/2024, 11:39 AMcompileTaskProvider: TaskProvider<KotlinCompilationTask>
this looks more like legacy API that we haven't processed yet.
But I remember we lacked some API to granularly control concrete compiler invocations and thus the compile task provider is the only way to do it.
In general I agree that exposing tasks shouldn't be a default solution.
Maybe we should mark all accessors to the tasks as "delecate api". And / Or detect cases when the task properties has changed by 3rd party (user or other plugins) and warn about it.tapchicoma
12/19/2024, 11:40 AMAnton Lakotka [JB]
12/19/2024, 11:40 AMHakan Mehmed
01/13/2025, 11:05 AMAnton Lakotka [JB]
01/14/2025, 1:56 PMHakan Mehmed
03/27/2025, 11:59 AMcompileTaskProvider
to configure the android compilations compile options but we still haven't added support for it on our end. If this API is looking like it will stay for the foreseeable future, I can push for it's adoption on our end. @tapchicoma let me knowtapchicoma
03/27/2025, 2:31 PMkotlin.compilerOptions {}
DSL? What are their use-case? 🤔Hakan Mehmed
03/27/2025, 4:13 PMkotlin.androidLibrary { compilations.configureEach { compilerOptions {...} } }
which works but is deprecated and logs a warning