I want to make kaptKotlin run before bootRun: ```s...
# getting-started
c
I want to make kaptKotlin run before bootRun:
Copy code
sourceSets {
    if(project.gradle.startParameter.taskNames.contains("kaptKotlin")) {
        main {
            kotlin {
                srcDirs("src/main/kotlin", "../shared/src/jvmMain/kotlin")
            }
        }
    }
}

tasks.bootRun {
    dependsOn("kaptKotlin")
}
When I run the kaptKotlin directly, classes are generated, but they are not when I run bootRun. Although I've specified the dependency between the two tasks