Reputation: 14
I recently forked a Minecraft plugin by the name of Galactifun in order to adapt it to the needs of my server however I realised I couldn't compile it properly.
The plugin uses a gradle plugin called "plugin-yml" which automatically generates a plugin.yml upon compilation.
When I build the project, the plugin.yml appears in the build however I still get an error saying that it does not exist.
I tried:
Upvotes: 0
Views: 322
Reputation: 149
When plugin.yml is placed in the resources folder gradle jar
should automatically add this to the .jar. My mistake was using build artifacts
instead of gradle jar
. If you want use artifacts though, you should manually setup artifact preset to add plugin.yml to the .jar also. (Project Structure -> Artifacts -> + to add new artifact with dependencies -> in the artifact preset click + to add file plugin.yml to the artifact).
For sure you need to add this code to the build.gradle:
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('paper-plugin.yml') {
expand props
}
}
Upvotes: 0