melix
11/07/2023, 5:31 PMtapchicoma
11/07/2023, 9:32 PMmelix
11/08/2023, 9:02 AMtapchicoma
11/08/2023, 9:04 AMKotlinJvmCompile
tasks meaning if you are doing some additional configuration on KotlinJvmCompile
task - you either also need to repeat it for KaptGenerateStubs
task or use more generic approachmelix
11/08/2023, 9:04 AMkapt.verbose=true
I'm supposed to see debug info for all kapt tasks, right? Currently I see it only for kaptKotlin
, but not for the kaptCustomKotlin
tasktapchicoma
11/08/2023, 9:07 AMKapt
tasksmelix
11/08/2023, 9:09 AMtapchicoma
11/08/2023, 9:10 AMmelix
11/08/2023, 9:10 AM:functional-tests:test --tests "io.micronaut.gradle.kotlin.KotlinLibraryFunctionalTest.test custom sourceSet for micronaut-library and kotlin with kotlin DSL for #plugin"
and see it faillibs.versions.toml
to 1.9.10 it passesNo annotation processors provided. Skip KAPT processing.So now have to figure out why...
tapchicoma
11/08/2023, 4:04 PMmelix
11/08/2023, 4:06 PMconfigurations.all {
if (name.contains("kapt") && name.contains("Classpath") && name.contains("Custom")) {
println(name)
incoming.beforeResolve {
extendsFrom(configurations["kaptCustom"])
}
}
}
tapchicoma
11/08/2023, 4:07 PMmelix
11/08/2023, 4:56 PMtapchicoma
11/09/2023, 8:57 AMmelix
11/09/2023, 8:58 AMtapchicoma
11/09/2023, 8:58 AMmelix
11/09/2023, 9:03 AMconfigurations.all {
var conf = this
if (name == "kaptClasspath_kaptCustomKotlin") {
incoming.beforeResolve {
configurations["kaptCustom"].dependencies.forEach {
conf.dependencies.add(it)
}
}
}
}
gets me further but still nothing. And it looks like there are no stubs generated 😮💨tapchicoma
11/09/2023, 12:50 PMmelix
11/09/2023, 12:52 PMtapchicoma
11/09/2023, 12:54 PMmelix
11/09/2023, 12:55 PMtapchicoma
11/09/2023, 12:55 PMmelix
11/09/2023, 12:56 PMafterEvaluate
and calls https://github.com/micronaut-projects/micronaut-gradle-plugin/blob/252e198ce392b51[…]n/src/main/java/io/micronaut/gradle/MicronautKotlinSupport.javatapchicoma
11/09/2023, 12:57 PMkaptClasspath
is not empty, but for custom one - it is emptymelix
11/09/2023, 12:57 PMkaptCustom
extendsFrom
tapchicoma
11/09/2023, 12:59 PMextendsFrom
is ignored for kapt configurations in 1.9.20melix
11/09/2023, 12:59 PMconfigurations.all {
var conf = this
if (name == "kaptClasspath_kaptCustomKotlin") {
incoming.beforeResolve {
configurations["kaptCustom"].dependencies.forEach {
conf.dependencies.add(it)
}
}
}
}
works around the fact that extendsFrom
is ignored (uh, silly). Yet, now I see the kapt task being invoked, but it doesn't work since it says all sources are up-to-date, which I think comes from the fact no stubs are generated.kaptClasspath
for the kaptGenerateStubsCustomKotlin
tasktapchicoma
11/09/2023, 1:49 PMmelix
11/09/2023, 1:51 PMtapchicoma
11/09/2023, 1:53 PMkaptCustom
configuration kapt subplugin does not see any declared dependenciesmelix
11/09/2023, 1:54 PMafterEvaluate
(see link above). However from what I've seen, they are still added before this code is executed.tapchicoma
11/09/2023, 1:55 PMmelix
11/09/2023, 1:55 PMtapchicoma
11/09/2023, 1:55 PMafterEvaluate
?melix
11/09/2023, 1:56 PMtapchicoma
11/09/2023, 1:59 PMafterEvaluate
kodee sad
And I advice you to create an issue - possibly we could fix it in 1.9.21 releasemelix
11/09/2023, 2:03 PMtapchicoma
11/15/2023, 4:13 PMafterEvaluate