Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
plugins {
java
id("java-library")
id("maven-publish")
id("idea")
}

repositories {
mavenLocal()
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}

maven {
url = uri("https://jitpack.io")
}

maven {
url = uri("https://ci.ender.zone/plugin/repository/everything/")
}

maven {
url = uri("https://repo.codemc.io/repository/maven-public/")
}

maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}

dependencies {
compileOnly("de.tr7zw:item-nbt-api-plugin:2.15.1")
compileOnly("dev.jorel:commandapi-bukkit-core:10.0.1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be putting all dependencies into the plugin. NBTAPI and COMMANDAPI should be shaded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not shaded for ItemAttributes either, it seems like a waste to shade it in multiple places.

compileOnly(libs.io.papermc.paper.paper.api)
compileOnly(libs.com.github.milkbowl.vaultapi)
compileOnly(libs.net.ess3.essentialsx)
compileOnly(libs.com.github.brcdev.minecraft.shopgui.api)
}

group = "com.shmkane"
version = "2.0.0"
description = "sellstick"

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}

tasks.processResources {
val props = mapOf("version" to project.version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("plugin.yml") {
expand(props)
}
}

tasks.register<Copy>("copyJarToServer") {
dependsOn(tasks.build)
from(layout.buildDirectory.file("libs/${rootProject.name}-${version}.jar"))
into("/data/BudgieNet/PAPER_1_21_4/plugins/")
}

tasks.register<Exec>("restartPaper") {
dependsOn(tasks.named("copyJarToServer"))
commandLine("bash", "-c", "/data/BudgieNet/PAPER_1_21_4/reload_sellstick.sh")
isIgnoreExitValue = true
}

tasks.named("build") {
finalizedBy("copyJarToServer")
finalizedBy("restartPaper")
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

configurations.configureEach {
resolutionStrategy.capabilitiesResolution.withCapability("com.destroystokyo.paper:paper-mojangapi") {
select("net.budgie.papercrane:papercrane-api:1.21.4-R0.1-SNAPSHOT")
}
}
96 changes: 0 additions & 96 deletions dependency-reduced-pom.xml

This file was deleted.

5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.configuration-cache=true

18 changes: 18 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
com-github-brcdev-minecraft-shopgui-api = "3.0.0"
com-github-milkbowl-vaultapi = "1.7"
de-tr7zw-item-nbt-api = "2.15.0"
dev-jorel-commandapi-bukkit-core = "10.1.0"
io-papermc-paper-paper-api = "1.21.5-R0.1-SNAPSHOT"
net-ess3-essentialsx = "2.16.1"

[libraries]
com-github-brcdev-minecraft-shopgui-api = { module = "com.github.brcdev-minecraft:shopgui-api", version.ref = "com-github-brcdev-minecraft-shopgui-api" }
com-github-milkbowl-vaultapi = { module = "com.github.MilkBowl:VaultAPI", version.ref = "com-github-milkbowl-vaultapi" }
de-tr7zw-item-nbt-api = { module = "de.tr7zw:item-nbt-api", version.ref = "de-tr7zw-item-nbt-api" }
dev-jorel-commandapi-bukkit-core = { module = "dev.jorel:commandapi-bukkit-core", version.ref = "dev-jorel-commandapi-bukkit-core" }
io-papermc-paper-paper-api = { module = "io.papermc.paper:paper-api", version.ref = "io-papermc-paper-paper-api" }
net-ess3-essentialsx = { module = "net.ess3:EssentialsX", version.ref = "net-ess3-essentialsx" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading