Skip to content

Commit

Permalink
Merge branch 'hotfix-1.0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamierocks committed Sep 11, 2016
2 parents 72b9cf2 + dcc7952 commit d1bd973
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaultTasks 'clean', 'licenseFormat', 'build'
// Project information
allprojects {
group = 'blue.lapis.nocturne'
version = '1.0.4'
version = '1.0.5'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
Expand Down
16 changes: 12 additions & 4 deletions src/main/java/blue/lapis/nocturne/mapping/io/writer/SrgWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public SrgWriter(PrintWriter out) {

@Override
public void write(MappingContext mappingContext) {
mappingContext.getMappings().values().forEach(this::writeClassMapping);
mappingContext.getMappings().values().stream().sorted(
(o1, o2) -> o1.getFullObfuscatedName().compareToIgnoreCase(o2.getFullObfuscatedName())
).forEach(this::writeClassMapping);
clWriter.close();
fdWriter.close();
mdWriter.close();
Expand All @@ -88,9 +90,15 @@ protected void writeClassMapping(ClassMapping classMapping) {
classMapping.getFullObfuscatedName(), classMapping.getFullDeobfuscatedName());
}

classMapping.getInnerClassMappings().values().stream().filter(NOT_USELESS).forEach(this::writeClassMapping);
classMapping.getFieldMappings().values().stream().filter(NOT_USELESS).forEach(this::writeFieldMapping);
classMapping.getMethodMappings().values().stream().filter(NOT_USELESS).forEach(this::writeMethodMapping);
classMapping.getInnerClassMappings().values().stream().filter(NOT_USELESS).sorted(
(o1, o2) -> o1.getFullObfuscatedName().compareToIgnoreCase(o2.getFullObfuscatedName())
).forEach(this::writeClassMapping);
classMapping.getFieldMappings().values().stream().filter(NOT_USELESS).sorted(
(o1, o2) -> o1.getObfuscatedName().compareToIgnoreCase(o2.getObfuscatedName())
).forEach(this::writeFieldMapping);
classMapping.getMethodMappings().values().stream().filter(NOT_USELESS).sorted(
(o1, o2) -> o1.getObfuscatedName().compareToIgnoreCase(o2.getObfuscatedName())
).forEach(this::writeMethodMapping);
}

@Override
Expand Down

0 comments on commit d1bd973

Please sign in to comment.