Robert Jaros
09/13/2025, 12:07 PMvite {}
block.Robert Jaros
09/13/2025, 12:09 PMCLOVIS
09/13/2025, 12:23 PMvite { plugins... }
. The plugins applied be default will only be available on the WriteConfig
tasks because KGP uses afterEvaluate
:/CLOVIS
09/13/2025, 12:24 PMRobert Jaros
09/13/2025, 12:50 PMvite {}
block? I've added new autoRewriteIndex
option, but whatever I set in my buildfile, I just get the default value. I've tried project.viteConfig
and some other variants, but nothing works (the value is visible but only inside KotlinViteExec
task).CLOVIS
09/13/2025, 1:23 PMCLOVIS
09/13/2025, 1:23 PMCLOVIS
09/13/2025, 1:24 PMRobert Jaros
09/13/2025, 1:26 PMRobert Jaros
09/13/2025, 1:27 PMautoRewriteIndex.convention(false)
in setDefaultsRobert Jaros
09/13/2025, 1:28 PMKotlinVitePlugin.apply()
and the value is always false.CLOVIS
09/13/2025, 1:29 PMRobert Jaros
09/13/2025, 1:29 PMCLOVIS
09/13/2025, 1:30 PMNow I just want to read the value inside KotlinVitePlugin.apply() and the value is always false.
Ah that's normal, `apply()`runs when Gradle runs the `plugins {}`block, which is before it runs the build script Ideally you should only read properties during task execution, or during another property's initialization