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
84 changes: 77 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,67 @@ concurrency:
cancel-in-progress: true

jobs:
cold-forge-bootstrap:
name: Cold Forge bootstrap
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install pinned Java 25 ForgeGradle Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'

- name: Install pinned Java 8 compilation toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install pinned Java 17 Gradle runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '17.0.1+12'

- name: Bootstrap Forge from an empty cache
shell: bash
env:
GRADLE_USER_HOME: ${{ runner.temp }}/orespawn-cold-gradle
run: |
set -euo pipefail
test ! -e .gradle
test ! -e "$GRADLE_USER_HOME"
mkdir -p "$GRADLE_USER_HOME"
chmod +x ./gradlew
gradle_args=(
classes verifyLegacyFixtures
--no-daemon --no-build-cache --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"

- name: Verify same-cache bootstrap offline
shell: bash
env:
GRADLE_USER_HOME: ${{ runner.temp }}/orespawn-cold-gradle
run: |
set -euo pipefail
gradle_args=(
classes verifyLegacyFixtures
--rerun-tasks --offline --no-daemon --no-build-cache --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"

build:
name: Build, test, and audit
runs-on: ubuntu-latest
Expand All @@ -26,17 +87,23 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
- name: Install pinned Java 25 ForgeGradle Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'

- name: Install pinned Java 8 compilation toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install Java 17 for Gradle
- name: Install pinned Java 17 Gradle runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'
distribution: temurin
java-version: '17.0.1+12'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand All @@ -48,6 +115,9 @@ jobs:
run: >-
./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums
verifyEclipseProductionClasspath --no-daemon --stacktrace
-Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false

- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
Expand All @@ -56,9 +126,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/OreSpawn-4.0.9.115021.jar
build/libs/OreSpawn-4.0.9.115021-sources.jar
build/libs/OreSpawn-4.0.9.115021-javadoc.jar
build/libs/OreSpawn-4.0.16.115021.jar
build/libs/OreSpawn-4.0.16.115021-sources.jar
build/libs/OreSpawn-4.0.16.115021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
- name: Install pinned Java 25 ForgeGradle Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'

- name: Install pinned Java 8 compilation toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install Java 17 for Gradle
- name: Install pinned Java 17 Gradle runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'
distribution: temurin
java-version: '17.0.1+12'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand All @@ -49,7 +55,14 @@ jobs:
- name: Compile production code
run: |
chmod +x ./gradlew
./gradlew clean classes --no-daemon --stacktrace
gradle_args=(
clean classes
--no-daemon --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"

- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
49 changes: 49 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
Version 4.0.16.115021

* Adopt the shared 4.0.16 release identity. Forge 1.15 has no server-side
GameTest harness, so the later GameTest lifecycle repair is not applicable
on this target.
* Ordinary dedicated benchmark servers continue to stop automatically when
requested.

Version 4.0.15.115021

* Classify generated geology and public geology samples through the same
stable quart-biome cell at three-dimensional biome boundaries.
* Keep ore family-host filters and sampler predictions consistent when later
surface features alter the final heightmap by a small amount.
* Existing chunks, profiles, API signatures, and schemas are unchanged.

Version 4.0.14.115021

* Convert exposed one-layer vanilla Snow from the first free cell immediately
above Minecraft's motion-blocking surface when a dimension supplies a custom
snow material.
* Retain the existing surface Ice conversion and leave buried or authored Snow
and Ice unchanged.

Version 4.0.13.115021

* Give the public ore-dimension builder the exact biome include/exclude and
biome-dictionary filter support already available in provider JSON.
* Accept valid namespaced geome IDs in both creation-editor validation paths
while preserving legacy unnamespaced geome keys.
* API major 1, schemas, existing profiles, generated chunks, and worldgen
behaviour are unchanged.

Version 4.0.12.115021

* Classify public geology samples at the same highest occupied block used by
chunk geology generation, rather than the first free block above it.
* Keep public sampler predictions consistent with generated rock at vertical
biome seams without changing existing chunks, profiles, or generation.

Version 4.0.10.115021

* Evaluate Stable Layers rock min_y and max_y bounds against actual world Y
instead of the vertically shifted formation coordinate.
* Preserve the shifted formation identity for layer, family, and rock choice
while preventing vanilla Stone fallback near dimension floors and ceilings.
* Apply the correction only while generating new chunks; existing chunks and
saved profiles remain unchanged.

Version 4.0.9.115021

* Replace provider-declared natural terrain hosts during the existing geology
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ End" policy used by mods such as Base Metals.
This is not the unrelated mod that adds mobs and dimensions under the same
name.

This branch builds target-qualified version `4.0.9.115021`: the OreSpawn 4.0.9
This branch builds target-qualified version `4.0.16.115021`: the OreSpawn 4.0.16
feature set for Minecraft 1.15.2 and Forge. See the
[versioning policy](docs/VERSIONS.md) for the encoding and release convention.

Expand Down Expand Up @@ -95,9 +95,11 @@ exported to `config/orespawn-guide/` without overwriting existing files.

## Building

Run Gradle with Java 17 from the repository root. Install the exact Temurin
`8.0.502+7` toolchain used to compile production code and test fixtures for
Minecraft 1.15.2; the build rejects a different Java 8 toolchain:
Run Gradle with Java 17 from the repository root. Install exact Temurin
`25.0.3+9` for ForgeGradle's Mavenizer and exact Temurin `8.0.502+7` for the
Minecraft 1.15.2 compilation and fixture toolchain. Java 17 remains the Gradle
runtime, while production bytecode remains Java 8; the build rejects a
different Java 8 toolchain:

```powershell
.\gradlew.bat clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums --no-daemon
Expand Down
48 changes: 39 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import groovy.json.JsonSlurper
import groovy.xml.XmlSlurper
import java.nio.charset.StandardCharsets
import java.security.MessageDigest
import java.util.jar.Manifest
Expand Down Expand Up @@ -35,6 +36,9 @@ if (versionParts[3] != expectedTargetVersion) {
ext.functional_version = versionParts[0..2].join('.')
ext.display_version = project.mod_version
ext.release_tag = project.mod_version
def expectedMavenGroup = 'zone.moddev.mc.orespawn'
def expectedMavenArtifact = 'OreSpawn'
def expectedMavenCoordinate = "${expectedMavenGroup}:${expectedMavenArtifact}:${project.version}"

java {
toolchain {
Expand Down Expand Up @@ -464,6 +468,7 @@ level-name=surface-integration-world
level-seed=zsjpxah
level-type=default
online-mode=false
server-port=0
allow-nether=true
generate-structures=false
spawn-protection=0
Expand Down Expand Up @@ -676,7 +681,7 @@ tasks.named('jar', Jar) {
'Implementation-Vendor' : 'SkyBlade1978',
'OreSpawn-API-Version' : '1',
'FMLAT' : 'accesstransformer.cfg',
'Maven-Artifact' : "${project.group}:${base.archivesName.get()}:${project.version}",
'Maven-Artifact' : expectedMavenCoordinate,
'Built-On-Java' : '8',
'Built-On' : "${project.minecraft_version}-${project.forge_version}"
])
Expand Down Expand Up @@ -732,7 +737,8 @@ def preparedReleaseDir = providers.gradleProperty('preparedReleaseDir')
tasks.register('verifyReleaseConfiguration') {
group = 'verification'
doLast {
if (project.mod_version != '4.0.9.115021'
if (project.mod_version != '4.0.16.115021'
|| project.mod_group != expectedMavenGroup
|| project.minecraft_version != '1.15.2'
|| project.forge_version != '31.2.57'
|| project.mapping_channel != 'snapshot'
Expand All @@ -745,11 +751,11 @@ tasks.register('verifyReleaseConfiguration') {
throw new GradleException('Unexpected dispatcher or Java target metadata')
}
List<String> expectedPublicArtifacts = [
'OreSpawn-4.0.9.115021.jar',
'OreSpawn-4.0.9.115021-sources.jar',
'OreSpawn-4.0.9.115021-javadoc.jar'
'OreSpawn-4.0.16.115021.jar',
'OreSpawn-4.0.16.115021-sources.jar',
'OreSpawn-4.0.16.115021-javadoc.jar'
]
if (base.archivesName.get() != 'OreSpawn'
if (base.archivesName.get() != expectedMavenArtifact
|| expectedReleaseFiles.get().collect { it.toString() } != expectedPublicArtifacts) {
throw new GradleException('Public artifacts must use the version-only OreSpawn filename contract')
}
Expand All @@ -764,7 +770,7 @@ tasks.register('verifyReleaseConfiguration') {
'src/main/java/zone/moddev/mc/orespawn/worldgen/LegacyMineralogyProfileMigration.java',
'README.md', 'CHANGELOG.txt'
].each { path ->
if (!file(path).getText('UTF-8').contains('4.0.9.115021')) {
if (!file(path).getText('UTF-8').contains('4.0.16.115021')) {
throw new GradleException("Release identity missing from ${path}")
}
}
Expand Down Expand Up @@ -930,6 +936,7 @@ tasks.register('verifyReleaseArtifacts') {
|| manifest.getValue('Implementation-Version') != project.mod_version
|| manifest.getValue('OreSpawn-API-Version') != '1'
|| manifest.getValue('FMLAT') != 'accesstransformer.cfg'
|| manifest.getValue('Maven-Artifact') != expectedMavenCoordinate
|| manifest.getValue('Implementation-Timestamp') != null) {
throw new GradleException('Release manifest is incorrect or volatile')
}
Expand Down Expand Up @@ -1029,8 +1036,8 @@ def mavenUploadPassword = providers.environmentVariable('MAVEN_UPLOAD_PASSWORD')
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.group.toString()
artifactId = base.archivesName.get()
groupId = expectedMavenGroup
artifactId = expectedMavenArtifact
version = project.version.toString()
if (preparedReleaseDir.isPresent()) {
File prepared = file(preparedReleaseDir.get())
Expand Down Expand Up @@ -1066,6 +1073,26 @@ publishing {
}
}
}
tasks.register('verifyMavenCoordinates') {
group = 'verification'
description = 'Verifies the generated POM uses OreSpawn\'s mod-specific Maven namespace.'
dependsOn tasks.named('generatePomFileForMavenJavaPublication')
doLast {
File pomFile = layout.buildDirectory.file(
'publications/mavenJava/pom-default.xml').get().asFile
if (!pomFile.isFile()) {
throw new GradleException("Generated Maven POM does not exist: ${pomFile}")
}
def pom = new XmlSlurper(false, false).parse(pomFile)
def actual = [pom.groupId.text(), pom.artifactId.text(), pom.version.text()]
def expected = [expectedMavenGroup, expectedMavenArtifact,
project.version.toString()]
if (project.group.toString() != expectedMavenGroup || actual != expected) {
throw new GradleException("Expected Maven coordinate ${expected.join(':')}, " +
"found ${actual.join(':')}")
}
}
}
tasks.register('validateMavenReleaseCredentials') {
group = 'publishing'
doLast {
Expand All @@ -1081,6 +1108,7 @@ tasks.register('validateMavenReleaseCredentials') {
}
tasks.withType(PublishToMavenRepository).configureEach {
dependsOn tasks.named('validateMavenReleaseCredentials')
dependsOn tasks.named('verifyMavenCoordinates')
dependsOn preparedReleaseDir.isPresent()
? tasks.named('verifyPreparedReleaseArtifacts')
: tasks.named('verifyReleaseArtifacts')
Expand Down Expand Up @@ -1236,6 +1264,7 @@ tasks.register('verifyCommandPortability') {
}

tasks.named('check') { dependsOn tasks.named('verifyCommandPortability') }
tasks.named('check') { dependsOn tasks.named('verifyMavenCoordinates') }

def packagedForgeServerRuntime = providers.gradleProperty('packagedForgeServerRuntime')
def packagedForgeClientRuntime = providers.gradleProperty('packagedForgeClientRuntime')
Expand Down Expand Up @@ -1268,6 +1297,7 @@ level-name=surface-integration-world
level-seed=zsjpxah
level-type=default
online-mode=false
server-port=0
allow-nether=true
generate-structures=false
spawn-protection=0
Expand Down
Loading
Loading