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
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Base Metals 3.1.0.119041
- Use the new creative tabs and fluid types. Filled molten-metal buckets remain visible and searchable.
- Update door models, recipes, loot, configuration screens and save conversion for the newer Minecraft APIs.
- Save configuration-screen changes together so quick edits aren't lost.
- Preserve translated characters when building on Windows.
- Remove obsolete vanilla biome registry snapshots during upgrades, with a backup. Keep modded biome snapshots untouched.
- Require the published OreSpawn 4.1.0.119041 release, keeping the same ore rules and copper defaults.
- Keep unsupported optional-mod jars out of development launches. Their integration data is retained for future compatibility work.
Expand Down
16 changes: 16 additions & 0 deletions gradle/release/artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.apache.tools.ant.filters.FixCrLfFilter

// Normalize archive text as well as the working tree, including generated Javadocs.
tasks.withType(Jar).configureEach {
filteringCharset = 'UTF-8'
filesMatching(['**/*.java', '**/*.json', '**/*.lang', '**/*.mcmeta', '**/*.md',
'**/*.txt', '**/*.cfg', '**/*.properties', '**/*.xml', '**/*.html',
'**/*.css', '**/*.js', '**/element-list', '**/package-list']) {
Expand All @@ -16,6 +17,7 @@ tasks.withType(Jar).configureEach {

// Expand the release identity into Forge metadata and package public documentation.
tasks.named('processResources', ProcessResources).configure {
filteringCharset = 'UTF-8'
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
Expand Down Expand Up @@ -343,6 +345,20 @@ tasks.register('verifyReleaseArtifacts') {
if (locales.size() != 18) {
throw new GradleException("Release jar must contain all 18 language files, found ${locales.size()}")
}
locales.each { path ->
File sourceFile = sourceSets.main.resources.srcDirs
.collect { new File(it, path) }.find { it.isFile() }
if (sourceFile == null) {
throw new GradleException("No source language file for ${path}")
}
String source = sourceFile.getText('UTF-8')
.replace('\r\n', '\n').replace('\r', '\n')
if (!source.endsWith('\n')) source += '\n'
String packaged = zip.getInputStream(zip.getEntry(path)).getText('UTF-8')
if (packaged != source) {
throw new GradleException("Release jar changed translated text in ${path}")
}
}
if (names.any { it.endsWith('.class') && (it.contains('/gametest/')
|| it.contains('/smoke/') || it.startsWith('com/mcmoddev/')) }) {
throw new GradleException('Release jar contains validation or legacy implementation classes')
Expand Down
Loading