mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
Debloat the Velocity project
This commit is contained in:
+1
-27
@@ -6,7 +6,6 @@ val paperApiVersion = "26.1.2"
|
||||
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
id("net.kyori.blossom")
|
||||
id("com.gradleup.shadow")
|
||||
@@ -132,7 +131,7 @@ tasks {
|
||||
property("author", if (System.getenv("JENKINS_URL") != null) "jenkins" else System.getProperty("user.name"))
|
||||
property("buildNumber", if (System.getenv("BUILD_NUMBER") != null) System.getenv("BUILD_NUMBER") else getBuildNumber())
|
||||
property("date", SimpleDateFormat("MM/dd/yyyy '<light_purple>at<gold>' hh:mm:ss a z").format(Date()))
|
||||
property("gitCommit", indraGit.commit().get().name.take(7))
|
||||
property("gitCommit", indraGit.commit().get().name)
|
||||
property("minecraftVersion", paperApiVersion)
|
||||
}
|
||||
}
|
||||
@@ -150,28 +149,3 @@ tasks {
|
||||
options.memberLevel = JavadocMemberLevel.PRIVATE
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
pom.withXml {
|
||||
val dependenciesNode = asNode().appendNode("dependencies")
|
||||
configurations.getByName("library").allDependencies.configureEach {
|
||||
dependenciesNode.appendNode("dependency")
|
||||
.appendNode("groupId", group).parent()
|
||||
.appendNode("artifactId", name).parent()
|
||||
.appendNode("version", version).parent()
|
||||
.appendNode("scope", "provided").parent()
|
||||
}
|
||||
configurations.getByName("implementation").allDependencies.configureEach {
|
||||
dependenciesNode.appendNode("dependency")
|
||||
.appendNode("groupId", group).parent()
|
||||
.appendNode("artifactId", name).parent()
|
||||
.appendNode("version", version).parent()
|
||||
.appendNode("scope", "provided").parent()
|
||||
}
|
||||
}
|
||||
artifacts.artifact(tasks.shadowJar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,24 +20,48 @@ final class DefaultPlexConfiguration implements PlexConfiguration
|
||||
return config.getString(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String path, String fallback)
|
||||
{
|
||||
return config.getString(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String path)
|
||||
{
|
||||
return config.getBoolean(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String path, boolean fallback)
|
||||
{
|
||||
return config.getBoolean(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String path)
|
||||
{
|
||||
return config.getInt(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String path, int fallback)
|
||||
{
|
||||
return config.getInt(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getStringList(String path)
|
||||
{
|
||||
return config.getStringList(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getStringList(String path, List<String> fallback)
|
||||
{
|
||||
return config.contains(path) ? config.getStringList(path) : fallback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(String path, Object value)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PlexCMD extends ServerCommand
|
||||
if (args.length == 0)
|
||||
{
|
||||
send(sender, mmString("<light_purple>Plex - A new freedom plugin."));
|
||||
send(sender, mmString("<light_purple>Plugin version: <gold>" + plugin.getPluginMeta().getVersion() + " #" + BuildInfo.getNumber() + " <light_purple>Git: <gold>" + BuildInfo.getCommit()));
|
||||
send(sender, mmString("<light_purple>Plugin version: <gold>" + plugin.getPluginMeta().getVersion() + " #" + BuildInfo.getNumber() + " <light_purple>Git: <gold>" + BuildInfo.shortenCommit(BuildInfo.getCommit())));
|
||||
send(sender, mmString("<light_purple>Authors: <gold>Telesphoreo, Taahh"));
|
||||
send(sender, mmString("<light_purple>Built by: <gold>" + BuildInfo.getAuthor() + " <light_purple>on <gold>" + BuildInfo.getDate()));
|
||||
send(sender, mmString("<light_purple>Run <gold>/plex modules <light_purple>to see a list of modules."));
|
||||
|
||||
@@ -41,4 +41,13 @@ public class BuildInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static String shortenCommit(String commit)
|
||||
{
|
||||
if (commit == null || commit.length() <= 7)
|
||||
{
|
||||
return commit;
|
||||
}
|
||||
return commit.substring(0, 7);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user