How would I set up gradle to include resources gen...
# kapt
m
How would I set up gradle to include resources generated by kapt in the processResources task? My attempt was
Copy code
tasks {
    val kaptKotlin by named<Kapt>("kaptKotlin") {

    }

    val processResources by named<ProcessResources>("processResources") {
        from(kaptKotlin.outputs)
    }
}
But that gives
Task with name 'kaptKotlin' not found in project ':myproject'
, and I think this would also include any classes generated to resources
t
probably you need to wrap your script into
plugins.withId("org.jetbrains.kotlin.kapt") { .. }
m
is that required separate from the
kotlin("kapt")
in the
plugins {}
block at the top of my build.gradle.kts file?
t
put it inside your
build.gradle.kts
after
plugins {..}
block:
Copy code
plugins { .. }

plugins.withId("org.jetbrains.kotlin.kapt") {
    tasks....
}
130 Views