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.kt
Vampire
01/20/2021, 5:37 PMsrc/main/java
, that's probably your problem. It should be src/main/kotlin
kotlin-dsl
plugin.rook
01/20/2021, 5:38 PMVampire
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.rook
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:43 PMroot/buildSrc/src/main/resources
, not root/buildSrc/main/resources
like you wrotegradlePlugin {
plugins {
register("bluetoothpoc") {
id = "rook.bluetoothpoc"
implementationClass = "rook.bluetoothpoc.MyPlugin"
}
}
}
rook
01/20/2021, 5:51 PMroot/buildSrc/main/resources
, it can no longer resolve the id
in my plugins
blockClassNotFoundException
. But I can’t figure out why it can’t find the class 😕buildSrc
. Is that normal?buildSrc
is not being included in the gradle sync processVampire
01/20/2021, 6:30 PMrook
01/20/2021, 6:31 PMVampire
01/20/2021, 7:31 PMrook
01/20/2021, 7:36 PMimplementationClass
has to exactly match package and class name, including letter case 🤦Vampire
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