pf4j-update
pf4j-update copied to clipboard
Automatically download plugin dependencies from repositories (Fix #22)
This is my initial attempt at implementing #22, any suggestions
Another way to solve this, would probably be to Download the plugin first, then inspect the manifest and download the plugins through that
@DRSchlaubi Sorry for delay and thank you for contribution.
The idea is good, the implementation is OK. What I don't like is the part with add dependencies
in PluginInfo
(and in XML).
The plugin's dependencies in my opinion should be discovered at runtime, using DependencyResolver
existed in PF4J core, as I said in https://github.com/pf4j/pf4j-update/issues/22.
It's hard to maintain (edit by hand) the dependencies available in plugins.json
.
I will take a look to see if I can extract this information at runtime.
It's hard to maintain (edit by hand) the dependencies available in plugins.json.
I just wrote a Gradle plugin generating the complete plugins.json, so I guess I didn't think about that too much
It's hard to maintain (edit by hand) the dependencies available in plugins.json.
I just wrote a Gradle plugin generating the complete plugins.json, so I guess I didn't think about that too much
Interesting. Can you tell me more about this plugin? Is it open source, is it available for use by anyone?
In fact, I think that I am (very) curios how other people/projects maintain information about the available plugins (plugins.json
) 😄.
It's a work in progress, but it's here: https://github.com/DRSchlaubi/mikbot/tree/main/gradle-plugin It's currently not in the Gradle plugin portal because I got tired after working on it for 6 hrs, but it will be eventually
it can generate the plugin.properties file almost automatically id is the gradle module name, dependencies are inferred from from the actual module dependencies, as there is a plugin and optionalPlugin dependency config, version is also inferred from the module
It also supports making a repository by geenerating a local repository
My CI clones the existing repo which is a branch with GH Pages on it, then add ne new versions to it and generate the plugins.json and push it to the branch again Ci is here: https://github.com/DRSchlaubi/mikbot/blob/main/.github/workflows/ci.yaml#L58-L93
The plugin should now be available to all Gradle users. docs are here: https://github.com/DRSchlaubi/mikbot/tree/main/gradle-plugin