https://kotlinlang.org logo
#kapt
Title
# kapt
a

ankushg

02/08/2022, 7:59 PM
Recently ran into an issue where someone accidentally reintroduced kapt into a module that we’d intentionally migrated fully onto KSP Is there a way to disable/block kapt so we can avoid similar issues in the future?
b

Big Chungus

02/08/2022, 8:23 PM
Block kapt plugin in gradle module resolution?
Or drop something like this in your module buildfile and cause builds to fail if anyone adds kapt plugin back to that module
Copy code
withPlugin≤KaptPluginClass> {
 throw IllegalStateException("Naugty boy! No kapt allowed...")
}
😂 4
a

ankushg

02/08/2022, 9:08 PM
Block kapt plugin in gradle module resolution?
do you have a snippet that doe this? I’m a bit unfamiliar with gradle module resolution and searching for “block” is just bringing up DSL blocks lol
b

Big Chungus

02/08/2022, 9:09 PM
I don't, unfortunately
t

tapchicoma

02/09/2022, 11:34 AM
kapt plugin is in the Kotlin plugin dependency, so, only way to block it is to use snippet above
👍🏼 1
👍 1
6 Views