Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop minor versions and improve build gradle #63

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
41 changes: 8 additions & 33 deletions build.gradle.kts
OneLiteFeather marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that's not part of the pr, but this looks not right, why is it called twice?

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure about this as you removed runFolia task as well. Do you want to keep Folia Support?

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
alias(libs.plugins.publishdata)
alias(libs.plugins.shadow)
alias(libs.plugins.paper.run)
alias(libs.plugins.bukkit.yml)
alias(libs.plugins.paper.yml)
alias(libs.plugins.hangar)
alias(libs.plugins.modrinth)
id("olf.build-logic")
Expand All @@ -27,15 +27,9 @@ if (!File("$rootDir/.git").exists()) {
group = "net.onelitefeather"
version = "1.4.0"

val minecraftVersion = "1.20.6"
val supportedMinecraftVersions = listOf(
"1.20",
"1.20.1",
"1.20.2",
"1.20.3",
"1.20.4",
"1.20.5",
"1.20.6",
"1.21"
)

repositories {
Expand All @@ -44,29 +38,23 @@ repositories {
}

dependencies {
compileOnly("io.papermc.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT")
implementation("net.kyori:adventure-text-minimessage:4.17.0")

compileOnly(libs.paper)
implementation(libs.adventure.minimessage)

// testing
testImplementation(kotlin("test"))
testImplementation("io.papermc.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT")
testImplementation("com.github.seeseemelk:MockBukkit-v1.19:3.1.0")
testImplementation("io.mockk:mockk:1.13.11")
testImplementation(libs.paper)
testImplementation(libs.mock.bukkit)
testImplementation(libs.mockk)
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
sourceSets.all {
languageSettings {
languageVersion = "2.0"
}
}
}

bukkit {
paper {
main = "dev.themeinerlp.attollo.Attollo"
apiVersion = "1.20"
authors = listOf("TheMeinerLP")
Expand All @@ -78,11 +66,6 @@ bukkit {
default = Default.TRUE
}
}
commands {
register("attollo") {
permission = "attollo.command.attollo"
}
}
}

publishData {
Expand Down Expand Up @@ -116,13 +99,6 @@ tasks {
pluginJars(rootProject.tasks.shadowJar.map { it.archiveFile }.get())
}
}
register<RunServer>("runFolia") {
downloadsApiService.set(xyz.jpenilla.runtask.service.DownloadsAPIService.folia(project))
minecraftVersion(minecraftVersion)
group = "run paper"
runDirectory.set(file("run-folia"))
jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true")
}
}

val branch = rootProject.branchName()
Expand Down Expand Up @@ -165,7 +141,6 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
uploadFile.set(tasks.shadowJar.flatMap { it.archiveFile })
gameVersions.addAll(supportedMinecraftVersions)
loaders.add("paper")
loaders.add("bukkit")
}
}

Expand Down
14 changes: 12 additions & 2 deletions settings.gradle.kts
TheMeinerLP marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,24 @@ dependencyResolutionManagement {
version("publishdata", "1.4.0")
version("modrinth", "2.+")
version("hangar", "0.1.2")
version("bukkit.yml", "0.6.0")
version("paper.yml", "0.6.0")
version("paper.run", "2.3.0")
version("shadow", "8.1.7")

version("paper", "1.21-R0.1-SNAPSHOT")
version("adventure", "4.17.0")
version("mockk", "1.13.11")
version("mock.bukkit", "3.9.0")

library("paper", "io.papermc.paper", "paper-api").versionRef("paper")
library("adventure.minimessage", "net.kyori", "adventure-text-minimessage").versionRef("adventure")
library("mockk", "io.mockk", "mockk").versionRef("mockk")
library("mock.bukkit", "com.github.seeseemelk", "MockBukkit-v1.20").versionRef("mock.bukkit")

plugin("publishdata","de.chojo.publishdata").versionRef("publishdata")
plugin("modrinth", "com.modrinth.minotaur").versionRef("modrinth")
plugin("hangar", "io.papermc.hangar-publish-plugin").versionRef("hangar")
plugin("bukkit.yml", "net.minecrell.plugin-yml.bukkit").versionRef("bukkit.yml")
plugin("paper.yml", "net.minecrell.plugin-yml.paper").versionRef("paper.yml")
plugin("paper.run", "xyz.jpenilla.run-paper").versionRef("paper.run")
plugin("shadow", "io.github.goooler.shadow").versionRef("shadow")
}
Expand Down
Loading