diff --git a/.gitignore b/.gitignore index 6642ab8..ed73505 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ target/ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +.gradle/ +build/ +!gradle/wrapper/gradle-wrapper.jar \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..178fef8 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,27 @@ +plugins { + java +} + +group = "com.alttd.destro174.custommotd" +version = System.getenv("BUILD_NUMBER") ?: "DEV" +description = "Allows setting custom MOTD in-game." + +dependencies { + compileOnly("com.alttd.cosmos:cosmos-api:26.2.build.17-stable") + compileOnly("me.clip:placeholderapi:2.12.3") +} + +tasks { + withType { + options.encoding = Charsets.UTF_8.name() + } + + withType { + options.encoding = Charsets.UTF_8.name() + } + + jar { + archiveFileName.set("${rootProject.name}.jar") + } +} + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..d30212c --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/pom.xml b/pom.xml deleted file mode 100644 index e3d7bbf..0000000 --- a/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - 4.0.0 - - com.alttd.destro174.custommotd - CustomMOTD - 1.0 - - ${project.artifactId} - clean package - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - - - src/main/resources - - plugin.yml - MOTD.yml - counter.yml - config.yml - - true - - - - - - - placeholderapi - http://repo.extendedclip.com/content/repositories/placeholderapi/ - - - - - - com.destroystokyo.paper - paper - 1.16.3-R0.1-SNAPSHOT - provided - - - me.clip - placeholderapi - 2.10.9 - provided - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..f40fc1e --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,34 @@ +rootProject.name = "CustomMOTD" + +val nexusUser = providers.gradleProperty("alttdSnapshotUsername").orNull ?: System.getenv("NEXUS_USERNAME") +val nexusPass = providers.gradleProperty("alttdSnapshotPassword").orNull ?: System.getenv("NEXUS_PASSWORD") + +dependencyResolutionManagement { + repositories { + mavenLocal() + mavenCentral() + maven { + url = uri("https://repo.alttd.com/repository/alttd-snapshot/") + credentials { + username = nexusUser + password = nexusPass + } + } + maven { + url = uri("https://repo.alttd.com/repository/alttd/") + credentials { + username = nexusUser + password = nexusPass + } + } + maven("https://repo.extendedclip.com/releases/") + maven("https://repo.destro.xyz/snapshots") + } + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) +} + +pluginManagement { + repositories { + gradlePluginPortal() + } +} \ No newline at end of file