mirror of
https://github.com/CarmJos/EasyPlugin.git
synced 2024-09-19 19:25:45 +00:00
feat(updater): 添加Github更新检查模块,方便获取基于Github发布的插件版本更新。
This commit is contained in:
parent
120362f221
commit
778235e8d1
@ -15,10 +15,10 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>easyplugin-updatechecker</artifactId>
|
<artifactId>easyplugin-githubchecker</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>EasyPlugin-UpdateChecker</name>
|
<name>EasyPlugin-GithubChecker</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
@ -21,6 +21,12 @@ public class GHUpdateChecker {
|
|||||||
return new GHUpdateChecker(plugin.getLogger(), getGithubOwner(plugin), plugin.getName());
|
return new GHUpdateChecker(plugin.getLogger(), getGithubOwner(plugin), plugin.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static @NotNull Runnable runner(@NotNull Logger logger,
|
||||||
|
@NotNull String owner, @NotNull String repo,
|
||||||
|
@NotNull String currentVersion) {
|
||||||
|
return of(logger, owner, repo).runner(currentVersion);
|
||||||
|
}
|
||||||
|
|
||||||
public static @NotNull Runnable runner(@NotNull Plugin plugin) {
|
public static @NotNull Runnable runner(@NotNull Plugin plugin) {
|
||||||
return of(plugin).runner(plugin.getDescription().getVersion());
|
return of(plugin).runner(plugin.getDescription().getVersion());
|
||||||
}
|
}
|
2
pom.xml
2
pom.xml
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<module>extension/papi</module>
|
<module>extension/papi</module>
|
||||||
<module>extension/vault</module>
|
<module>extension/vault</module>
|
||||||
<module>extension/updater</module>
|
<module>extension/gh-checker</module>
|
||||||
|
|
||||||
<module>collection/all</module>
|
<module>collection/all</module>
|
||||||
<module>collection/bom</module>
|
<module>collection/bom</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user