This commit is contained in:
parent
6fa9824ef8
commit
c7b2e78eb5
6 changed files with 20 additions and 34 deletions
|
@ -1,16 +1,19 @@
|
||||||
|
import org.gradle.api.artifacts.repositories.AuthenticationSupported
|
||||||
|
import org.gradle.authentication.http.HttpHeaderAuthentication
|
||||||
|
import org.gradle.api.credentials.HttpHeaderCredentials
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.gradleup.shadow") version "9.0.0-beta4"
|
id("com.gradleup.shadow") version "9.0.0-beta4"
|
||||||
id("io.papermc.paperweight.userdev") version "2.0.0-beta.10"
|
id("io.papermc.paperweight.userdev") version "2.0.0-beta.17"
|
||||||
id("org.sonarqube") version "5.1.0.4882"
|
id("org.sonarqube") version "5.1.0.4882"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "me.unurled"
|
group = "me.unurled"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
|
|
||||||
val mcVersion = "1.21.4-R0.1-SNAPSHOT"
|
val mcVersion = "1.21.4-R0.1-SNAPSHOT"
|
||||||
val lampVersion = "4.0.0-beta.17"
|
|
||||||
|
|
||||||
val javaVersion = 23
|
val javaVersion = 23
|
||||||
|
|
||||||
|
@ -22,10 +25,6 @@ repositories {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle(mcVersion)
|
paperweight.paperDevBundle(mcVersion)
|
||||||
implementation("io.github.revxrsal:lamp.common:${lampVersion}")
|
|
||||||
implementation("io.github.revxrsal:lamp.bukkit:${lampVersion}")
|
|
||||||
implementation("io.github.revxrsal:lamp.brigadier:${lampVersion}")
|
|
||||||
implementation("io.github.revxrsal:lamp.paper:${lampVersion}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -66,11 +65,14 @@ tasks.register<Jar>("javadocJar") {
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "repounurledme"
|
name = "SacredRealms"
|
||||||
url = uri("https://repo.unurled.me/releases")
|
url = uri("https://git.unurled.me/api/packages/SacredRealms/maven")
|
||||||
credentials(PasswordCredentials::class)
|
credentials(HttpHeaderCredentials::class) {
|
||||||
|
name = "Authorization"
|
||||||
|
value = "token " + project.findProperty("mavenToken")
|
||||||
|
}
|
||||||
authentication {
|
authentication {
|
||||||
create<BasicAuthentication>("basic")
|
create<HttpHeaderAuthentication>("header")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
9
gradlew
vendored
9
gradlew
vendored
|
@ -86,8 +86,7 @@ done
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
@ -115,7 +114,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
@ -206,7 +205,7 @@ fi
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
|
@ -70,11 +70,11 @@ goto fail
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
@ -8,9 +8,6 @@ import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import revxrsal.commands.Lamp;
|
|
||||||
import revxrsal.commands.bukkit.BukkitLamp;
|
|
||||||
import revxrsal.commands.bukkit.actor.BukkitCommandActor;
|
|
||||||
|
|
||||||
/** The SRCore class is a class that is used to manage the core of the plugin. */
|
/** The SRCore class is a class that is used to manage the core of the plugin. */
|
||||||
public final class SRCore {
|
public final class SRCore {
|
||||||
|
@ -18,7 +15,6 @@ public final class SRCore {
|
||||||
private static SRCore instance;
|
private static SRCore instance;
|
||||||
private final Managers managers;
|
private final Managers managers;
|
||||||
private Plugin plugin;
|
private Plugin plugin;
|
||||||
private Lamp<BukkitCommandActor> lamp;
|
|
||||||
|
|
||||||
private SRCore() {
|
private SRCore() {
|
||||||
managers = new Managers();
|
managers = new Managers();
|
||||||
|
@ -67,7 +63,6 @@ public final class SRCore {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
lamp = BukkitLamp.builder((JavaPlugin) plugin).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable Plugin tryFindPlugin() {
|
private @Nullable Plugin tryFindPlugin() {
|
||||||
|
@ -102,14 +97,4 @@ public final class SRCore {
|
||||||
public void unload() {
|
public void unload() {
|
||||||
managers.unload();
|
managers.unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return Lamp command processor
|
|
||||||
*
|
|
||||||
* @return null if {@link SRCore#setPlugin(Plugin)} is not already called
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public Lamp<BukkitCommandActor> lamp() {
|
|
||||||
return lamp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue