Skip to content

Commit

Permalink
Test build script update.
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed Jan 6, 2025
1 parent 5029a58 commit c9b7971
Show file tree
Hide file tree
Showing 39 changed files with 746 additions and 592 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build all file
run: ./gradlew build --stacktrace
- name: Publish to Modrinth
run: ./gradlew modrinthPublish --stacktrace
- name: Publish to Hangar
Expand Down
12 changes: 12 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 0 additions & 71 deletions api/build.gradle.kts

This file was deleted.

8 changes: 8 additions & 0 deletions api/bukkit-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
alias(libs.plugins.apiConvention)
}

dependencies {
compileOnly("org.spigotmc:spigot-api:${properties["minecraft_version"]}-R0.1-SNAPSHOT")
implementation(project(":api:standard-api"))
}
4 changes: 3 additions & 1 deletion api/fabric-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
plugins {
id("xyz.jpenilla.resource-factory-fabric-convention") version "1.2.0"
alias(libs.plugins.apiConvention)
alias(libs.plugins.resourceFactoryFabric)
alias(libs.plugins.loom)
}

dependencies {
Expand Down
3 changes: 3 additions & 0 deletions api/standard-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
alias(libs.plugins.apiConvention)
}
9 changes: 9 additions & 0 deletions api/velocity-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
alias(libs.plugins.apiConvention)
}

dependencies {
implementation(project(":api:standard-api"))
annotationProcessor("com.velocitypowered:velocity-api:${property("velocity_version")}-SNAPSHOT")
compileOnly("com.velocitypowered:velocity-api:${property("velocity_version")}-SNAPSHOT")
}
5 changes: 5 additions & 0 deletions bedrock/floodgate/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
alias(libs.plugins.standardConvention)
}

dependencies {
compileOnly(project(":api:bukkit-api"))
compileOnly("org.geysermc.floodgate:api:2.2.3-SNAPSHOT")
}
5 changes: 5 additions & 0 deletions bedrock/geyser/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
alias(libs.plugins.standardConvention)
}

dependencies {
compileOnly(project(":api:bukkit-api"))
compileOnly("org.geysermc.geyser:api:2.6.0-SNAPSHOT")
}
143 changes: 136 additions & 7 deletions bootstrap/bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import xyz.jpenilla.resourcefactory.bukkit.Permission

plugins {
alias(libs.plugins.bootstrapConvention)
alias(libs.plugins.resourceFactoryBukkit)
}

repositories {
maven("https://maven.enginehub.org/repo/") //WorldEdit, WorldGuard
maven("https://nexus.phoenixdevt.fr/repository/maven-public/") //MMOItems, MMOCore, MythicLib
Expand All @@ -11,6 +18,27 @@ repositories {
}

dependencies {
compileOnly("org.spigotmc:spigot-api:${properties["minecraft_version"]}-R0.1-SNAPSHOT")
compileOnly(libs.bundles.adventure)

compileOnly(shade(project(":api:standard-api"))!!)
compileOnly(shade(project(":api:bukkit-api"))!!)
testImplementation(project(":api:bukkit-api"))
rootProject.project("bedrock").subprojects.forEach {
compileOnly(shade(it)!!)
}
rootProject.project("scheduler").subprojects.forEach {
compileOnly(shade(it)!!)
}
rootProject.project("nms").subprojects.forEach {
compileOnly(shade(project(":nms:${it.name}", configuration = "reobf"))!!)
}
compileOnly(libs.bstatsBukkit)
shade(libs.bstatsBukkit)
compileOnly(libs.adventurePlatformBukkit)
compileOnly(shade(rootProject.fileTree("shaded"))!!)


compileOnly("io.lumine:Mythic-Dist:5.7.2")
compileOnly("io.lumine:MythicLib-dist:1.7.1-SNAPSHOT")
compileOnly("net.Indyuce:MMOCore-API:1.13.1-SNAPSHOT")
Expand All @@ -32,13 +60,114 @@ dependencies {
compileOnly("io.th0rgal:oraxen:1.186.1")
}

tasks.processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"version" to project.version
bukkitPluginYaml {
main = "kr.toxicity.hud.bootstrap.bukkit.BukkitBootstrapImpl"
version = project.version.toString()
name = rootProject.name
apiVersion = "1.19"
author = "toxicity"
description = "A multi-platform server-side implementation of HUD in Minecraft."
foliaSupported = true
website = "https://www.spigotmc.org/resources/115559"
softDepend = listOf(
"MythicLib",
"MythicMobs",
"MMOCore",
"MMOItems",
"PlaceholderAPI",
"WorldGuard",
"Vault",
"floodgate",
"Geyser-Spigot",
"Skript",
"SkBee",
"skript-placeholders",
"skript-reflect",
"SkinsRestorer",
"Parties",
"GPS",
"Nexo",
"Oraxen",
"BetterModel",
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
permissions {
create("betterhud.help") {
description = "Accesses to help command."
default = Permission.Default.OP
}
create("betterhud.reload") {
description = "Accesses to reload command."
default = Permission.Default.OP
}
create("betterhud.parse") {
description = "Accesses to parse command."
default = Permission.Default.OP
}
create("betterhud.hud") {
description = "Accesses to hud command."
default = Permission.Default.OP
children = mapOf(
"betterhud.hud.add" to true,
"betterhud.hud.remove" to true
)
}
create("betterhud.compass") {
description = "Accesses to compass command."
default = Permission.Default.OP
children = mapOf(
"betterhud.compass.add" to true,
"betterhud.compass.remove" to true
)
}
create("betterhud.turn") {
description = "Accesses to turn command."
default = Permission.Default.OP
children = mapOf(
"betterhud.turn.on" to true,
"betterhud.turn.off" to true,
"betterhud.turn.on.admin" to true,
"betterhud.turn.off.admin" to true
)
}
create("betterhud.pointer") {
description = "Accesses to pointer command."
default = Permission.Default.OP
children = mapOf(
"betterhud.pointer.set" to true,
"betterhud.pointer.clear" to true,
"betterhud.pointer.remove" to true
)
}
create("betterhud.popup") {
description = "Accesses to popup command."
default = Permission.Default.OP
children = mapOf(
"betterhud.popup.add" to true,
"betterhud.popup.remove" to true,
"betterhud.popup.show" to true,
"betterhud.popup.hide" to true
)
}
}
}

tasks.jar {
archiveBaseName = "${rootProject.name}-bukkit"
destinationDirectory = rootProject.layout.buildDirectory.dir("libs")
manifest {
attributes["paperweight-mappings-namespace"] = "spigot"
}
setManifest()
doLast {
relocateAll()
}
}

beforeEvaluate {
modrinth {
uploadFile = tasks.jar.get()
versionName = "BetterHud ${project.version} for bukkit"
gameVersions = SUPPORTED_MINECRAFT_VERSION
loaders = listOf("bukkit", "spigot", "paper", "folia", "purpur")
}
}
70 changes: 0 additions & 70 deletions bootstrap/bukkit/src/main/resources/plugin.yml

This file was deleted.

Loading

0 comments on commit c9b7971

Please sign in to comment.