Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
Merged
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
20 changes: 1 addition & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import groovy.json.JsonOutput
// because it commits+pushes — not a build responsibility.
// =====================================================================

def REPO_SLUG = "runtoolkit/dataLib-dp"

// label -> pack_format. Single target now that overlays are gone.
def TARGETS = [
"full" : 107
Expand All @@ -22,20 +20,6 @@ def extensionsSrc = file("datapacks/datalib_extensions")
def buildRoot = layout.buildDirectory.dir("datapack").get().asFile
def distRoot = layout.buildDirectory.dir("dist").get().asFile

// ---------------------------------------------------------------------
// Repo lock — refuse to run outside runtoolkit/dataLib-dp
// ---------------------------------------------------------------------
tasks.register("repoLock") {
group = "verification"
description = "Fails the build if GITHUB_REPOSITORY != ${REPO_SLUG}"
doLast {
def repo = System.getenv("GITHUB_REPOSITORY")
if (repo != null && repo != REPO_SLUG) {
throw new GradleException("This build may only run in ${REPO_SLUG} (got: ${repo})")
}
}
}

// ---------------------------------------------------------------------
// Lint: JSON validity
// ---------------------------------------------------------------------
Expand Down Expand Up @@ -173,7 +157,6 @@ TARGETS.each { label, packFormat ->
def prepareTask = tasks.register("prepare${label.capitalize()}") {
group = "build"
description = "Assembles the ${label} datapack variant into build/datapack/${label}"
dependsOn "repoLock"

doLast {
delete(stageDir)
Expand Down Expand Up @@ -212,7 +195,6 @@ def extensionsStageDir = new File(buildRoot, "extensions")
def prepareExtensionsTask = tasks.register("prepareExtensions") {
group = "build"
description = "Assembles datalib_extensions into build/datapack/extensions"
dependsOn "repoLock"

doLast {
delete(extensionsStageDir)
Expand Down Expand Up @@ -289,7 +271,7 @@ tasks.register("repack") {
tasks.register("release") {
group = "publish"
description = "Creates/updates the GitHub release for the full build"
dependsOn "repoLock", "zipFull", "repack"
dependsOn "zipFull", "repack"

doLast {
def metaFile = new File(buildRoot, "full/pack.mcmeta")
Expand Down