Skip to content

Migration of plugin.yml content to build script #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
osipxd opened this issue Apr 18, 2025 · 0 comments
Open

Migration of plugin.yml content to build script #69

osipxd opened this issue Apr 18, 2025 · 0 comments

Comments

@osipxd
Copy link
Member

osipxd commented Apr 18, 2025

It would be great to generate a snippet to migrate content of plugin.yml to a build script. It would be useful both, for new users who wants to migrate and for the existing, who had been using the plugin before v1.0.0 (are there anybody? :D)

For example, if a user has the following plugin.yml:

api-version: 1.21.5
name: MyPlugin
version: '1.0'
main: org.example.myplugin.MyPlugin
depend: [Vault]
commands:
  myplugin:
    description: Print info anout the plugin

the following message should be shown in build log:

Some of the 'plugin.yml' properties are not generated from a build script.
Consider moving them into the build script and removing the 'plugin.yml' file.
Add these lines to the build script:

bukkit {
    apiVersion = "1.21.5"

    plugin {
        name = "MyPlugin"
        version = "1.0"
        main = "org.example.myplugin.MyPlugin"
        depend = listOf("Vault")
        commands {
            register("myplugin") {
                description = "Print info anout the plugin"
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant