rook
01/20/2021, 5:19 PMbuildSrc. The error I’m getting is the following
Could not find implementation class 'rook.bluetoothpoc.MyPlugin' for plugin 'rook.bluetoothpoc' specified in buildSrc.jar!/META-INF/gradle-plugins/rook.bluetoothpoc.properties
The path to MyPlugin is root/buildSrc/src/main/java/rook/bluetoothpoc/.
The path to rook.bluetoothpoc.properties is root/buildSrc/main/resources/META-INF/gradle-plugins/. It contains only the following line:
implementation-class=rook.bluetoothpoc.MyPlugin
I feel like I’m missing something really obvious.Vampire
01/20/2021, 5:20 PMrook
01/20/2021, 5:22 PMMyPlugin.ktrook
01/20/2021, 5:26 PMVampire
01/20/2021, 5:37 PMsrc/main/java, that's probably your problem. It should be src/main/kotlinVampire
01/20/2021, 5:37 PMkotlin-dsl plugin.Vampire
01/20/2021, 5:38 PMrook
01/20/2021, 5:38 PMrook
01/20/2021, 5:40 PMkotlin rather than java and there was no change. I’m getting the same error messageVampire
01/20/2021, 5:40 PMkotlin-dsl plugin is more.
It allows you to write pre-compiled script plugins, so you can write the plugins just like you would write the build scripts for the most part, including type-safe accessors for plugins applied with the plugins block.
Very handy for convention plugins.Vampire
01/20/2021, 5:43 PMroot/buildSrc/src/main/resources, not root/buildSrc/main/resources like you wroteVampire
01/20/2021, 5:47 PMVampire
01/20/2021, 5:49 PMgradlePlugin {
plugins {
register("bluetoothpoc") {
id = "rook.bluetoothpoc"
implementationClass = "rook.bluetoothpoc.MyPlugin"
}
}
}Vampire
01/20/2021, 5:50 PMrook
01/20/2021, 5:51 PMrook
01/20/2021, 5:58 PMroot/buildSrc/main/resources, it can no longer resolve the id in my plugins blockrook
01/20/2021, 6:05 PMrook
01/20/2021, 6:15 PMClassNotFoundException. But I can’t figure out why it can’t find the class 😕rook
01/20/2021, 6:16 PMbuildSrc. Is that normal?rook
01/20/2021, 6:16 PMbuildSrc is not being included in the gradle sync processVampire
01/20/2021, 6:30 PMVampire
01/20/2021, 6:30 PMVampire
01/20/2021, 6:30 PMVampire
01/20/2021, 6:30 PMVampire
01/20/2021, 6:30 PMrook
01/20/2021, 6:31 PMrook
01/20/2021, 7:26 PMrook
01/20/2021, 7:29 PMVampire
01/20/2021, 7:31 PMrook
01/20/2021, 7:36 PMrook
01/20/2021, 8:03 PMimplementationClass has to exactly match package and class name, including letter case 🤦rook
01/20/2021, 8:03 PMVampire
01/20/2021, 10:55 PMVampire
01/20/2021, 10:55 PMrook
01/21/2021, 5:12 PMMyPlugin file did not have an extension. So I guess it wasn’t being identified as a .kt fileVampire
01/21/2021, 9:38 PM