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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf
*.bat text eol=crlf
*.png binary
*.ogg binary
*.jar binary
*.zip binary
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Power Advantage 2.4.4.113021

- Exclude empty directories so development jars match between existing workspaces and fresh CI checkouts.
- Port Power Advantage to Minecraft 1.13.2 with ForgeGradle 7 and Java 8 support.
- Keep existing block, item, fluid and saved-state names, the legacy public API and Iron Age Furniture compatibility facades.
- Add direct 1.10 and 1.12 world migration, including inventories, fluids, entities, pets, enchantments and old configuration files. Back up worlds before upgrading.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Both the original Windows-input jar and a clean LF-checkout build have exact
checksums in `gradle.properties`. Their class bytes and archive entries match;
only text line endings differ. CI uses the LF build. Unknown hashes still fail.
Advantage's own archives normalize text to LF.
All Advantage archives also exclude empty directories left behind by older source layouts.

Release jars are written to `build/libs`; `deobfJar` writes the sibling-development jar to `build/libs-dev`.

Expand Down
14 changes: 13 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ tasks.withType(Javadoc).configureEach {
}

tasks.withType(AbstractArchiveTask).configureEach {
includeEmptyDirs = false
preserveFileTimestamps = false
reproducibleFileOrder = true
}
Expand Down Expand Up @@ -369,7 +370,7 @@ tasks.register('verifyReleaseConfiguration') {
throw new GradleException("Persistent tile entity id changed or disappeared: ${id}")
}
}
String modsToml = file('src/main/resources/META-INF/mods.toml').getText('UTF-8')
String modsToml = file('src/main/resources/META-INF/mods.toml').getText('UTF-8').replace('\r\n', '\n')
['modId="poweradvantage"', 'modId="basemetals"', 'modId="orespawn"',
'mandatory=true'].each { required ->
if (!modsToml.contains(required)) {
Expand Down Expand Up @@ -470,6 +471,17 @@ tasks.register('verifyReleaseArtifacts') {
if (jars.collect { it.name } != expected) {
throw new GradleException("Expected exactly ${expected}, found ${jars.collect { it.name }}")
}
// Empty source directories survive branch changes but are absent in fresh clones.
(jars + [tasks.named('jar', Jar).get().archiveFile.get().asFile]).each { candidate ->
new ZipFile(candidate).withCloseable { zip ->
List entries = zip.entries().toList()
entries.findAll { it.isDirectory() }.each { directory ->
if (!entries.any { !it.isDirectory() && it.name.startsWith(directory.name) }) {
throw new GradleException("${candidate.name} contains empty directory ${directory.name}")
}
}
}
}
jars.each { candidate ->
if (candidate.length() == 0L) {
throw new GradleException("Empty release artifact: ${candidate.name}")
Expand Down
2 changes: 1 addition & 1 deletion test-rig/profiles/dev-core-apocalyptic.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"version": "2.2.5.113021",
"file": "SteamAdvantage-2.2.5.113021-deobf.jar",
"path": "../../SteamAdvantage/SteamAdvantage/build/libs-dev/SteamAdvantage-2.2.5.113021-deobf.jar",
"sha256": "5F381C5FD50B3C22BC3531B4D3D7160AF26F703711F360AF8FAD4530BAF21E37"
"sha256": "CD0FF2C4F79484211DF3BBF1CA63F48C43620FEB764390FAC614AD3DDE0AF5C3"
},
{
"id": "electricadvantage",
Expand Down
2 changes: 1 addition & 1 deletion test-rig/profiles/dev-core-tech-progression.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"version": "2.2.5.113021",
"file": "SteamAdvantage-2.2.5.113021-deobf.jar",
"path": "../../SteamAdvantage/SteamAdvantage/build/libs-dev/SteamAdvantage-2.2.5.113021-deobf.jar",
"sha256": "5F381C5FD50B3C22BC3531B4D3D7160AF26F703711F360AF8FAD4530BAF21E37"
"sha256": "CD0FF2C4F79484211DF3BBF1CA63F48C43620FEB764390FAC614AD3DDE0AF5C3"
},
{
"id": "electricadvantage",
Expand Down
2 changes: 1 addition & 1 deletion test-rig/profiles/dev-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"version": "2.2.5.113021",
"file": "SteamAdvantage-2.2.5.113021-deobf.jar",
"path": "../../SteamAdvantage/SteamAdvantage/build/libs-dev/SteamAdvantage-2.2.5.113021-deobf.jar",
"sha256": "5F381C5FD50B3C22BC3531B4D3D7160AF26F703711F360AF8FAD4530BAF21E37"
"sha256": "CD0FF2C4F79484211DF3BBF1CA63F48C43620FEB764390FAC614AD3DDE0AF5C3"
},
{
"id": "electricadvantage",
Expand Down
Loading