Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lorenz 0.6.0 #47

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
71d7387
Support Fabric's Enigma
jamierocks Oct 26, 2018
ae6039a
Merge branch 'release-0.5.0' into develop
jamierocks May 21, 2019
4768d47
0.6.0: Prep for next dev cycle
jamierocks Aug 8, 2019
cc62cd6
Add JSON IO format, using GSON
jamierocks Aug 8, 2019
2ff5b95
travis: Fix build
jamierocks Aug 8, 2019
e983146
Bump to Bombe 0.4 SNAPSHOTS
jamierocks Sep 1, 2019
b71ca83
Add Groovy DSL
jamierocks Sep 2, 2019
30929a4
Unit test Groovy DSL
jamierocks Sep 2, 2019
9e94603
Move some common DSL code into a utility class
jamierocks Sep 2, 2019
b506ea6
Add missing convenience methods to ClassMapping
jamierocks Sep 2, 2019
fb58b40
Merge branch 'feature/dsl-groovy' into develop
jamierocks Sep 2, 2019
63a6199
Add IntelliJ codestyle
jamierocks Sep 17, 2019
794bd8d
travis: don't deploy on prs...
jamierocks Oct 15, 2019
d8571a9
travis: Fix Central deployment
jamierocks Nov 5, 2019
7d0f391
Cascading -> Composite
jamierocks Oct 28, 2019
3c7d533
io-gson: use gson-simple
jamierocks Nov 12, 2019
15e5883
Make mapping deobf names observable
jamierocks Nov 12, 2019
93656eb
Allow mapping changed listeners to be removed
jamierocks Nov 12, 2019
fa3e879
Use a single model factory, and make MappingSet iterable
jamierocks Nov 19, 2019
b7a0818
Use a single implementation of MappingSet
jamierocks Nov 25, 2019
af56ae4
Update to Bombe 0.4.0
jamierocks Mar 2, 2020
e7045a3
Merge branch 'release/0.5.1' into develop
jamierocks Apr 30, 2020
e3fc44e
Identify the GSON module as "gson"
jamierocks Apr 30, 2020
9ce171c
Support concurrently accessing mappings
jamierocks May 4, 2020
0a0a405
Merge branch 'hotfix-0.5.2' into develop
jamierocks May 7, 2020
caea6a5
Remove wrapping the Writer in a BufferedWriter in TextMappingsWriter
phase Jun 3, 2020
d80500e
Use the same MappingSet and model factory implementation
ramidzkh Jun 26, 2020
552eb6e
Include new mappings provided by the right side of a merge() call
DenWav Jul 2, 2020
875dbc7
Merge branch 'release-0.5.3' into develop
jamierocks Jul 3, 2020
0f7c49d
Add GitHub Sponsors info
jamierocks Jul 24, 2020
42cb171
Merge branch 'release-0.5.4' into develop
jamierocks Aug 25, 2020
46b2b87
Fix missed merge conflict
jamierocks Aug 25, 2020
40de7d9
Update to Bombe 0.5.0-SNAPSHOT
jamierocks Sep 10, 2020
86378af
build: Make artifacts automatic modules
zml2008 Sep 11, 2020
c4db7bb
Merge branch 'release-0.5.5' into develop
jamierocks Nov 7, 2020
6307763
Use a Groovy specific package for the Groovy DSL
jamierocks Nov 7, 2020
7ab7fdc
Merge branch 'release-0.5.6' into develop
jamierocks Nov 27, 2020
841107e
Merge branch 'develop' into feature/fabric-enigma
jamierocks Nov 30, 2020
8a8a6e6
Allow mapping formats to specify multiple file extensions
jamierocks Nov 30, 2020
fe6df82
Run Groovy unit tests
jamierocks Jan 12, 2021
d9701b0
Explicit requirement of mapping format identifier
jamierocks Jan 12, 2021
bfe2b6a
Merge branch 'feature/fabric-enigma' into develop
jamierocks Jan 12, 2021
acb9485
Have mapping formats specify whether they support reading/writing
jamierocks Jan 15, 2021
f7b4a28
Overhaul copy and reverse unit tests
jamierocks Jan 17, 2021
d6b3327
Allow registering listeners in Groovy DSL
jamierocks Jan 17, 2021
f5ac0ff
Update to Groovy 3 + Spock 2
jamierocks Jan 17, 2021
c576578
Test more copy scenarios
jamierocks Jan 17, 2021
4d70047
Test mapping completion
jamierocks Jan 18, 2021
328051b
Merge branch 'release-0.5.7' into develop
jamierocks Feb 1, 2021
ca8bf3c
Add methods to allow removing mappings from the model.
DenWav Apr 4, 2021
52462ad
Remove -io-kin module
jamierocks Apr 18, 2021
7e2ba4b
Remove -io-gson module
jamierocks Apr 18, 2021
9dc2efb
Declutter changelogs
jamierocks Apr 18, 2021
0ac7b04
Split Fabric Enigma support into it's own classes
jamierocks Sep 13, 2021
dc020f5
Write class mappings appropriately for Fabric's Enigma fork
jamierocks Oct 18, 2021
45d7ac2
Display bad line in (X)SrgReader Errors
phase Oct 18, 2021
6851a5e
Read class mappings appropriately for Fabric's Enigma fork
jamierocks Oct 19, 2021
356cef5
Amend changelog to reflect improved Fabric Enigma support
jamierocks Oct 23, 2021
a4df86f
Don't de-obfuscate field types twice
jamierocks Oct 23, 2021
da3e830
0.5.8: Begin dev cycle
jamierocks Oct 23, 2021
f32ea46
Don't de-obfuscate field types twice
jamierocks Oct 23, 2021
291cb1a
Correct spelling in TextMappingFormat
jamierocks Mar 13, 2021
3628c91
0.5.8: Release Time
jamierocks Oct 23, 2021
76ce6fb
Merge branch 'hotfix-0.5.8' into develop
jamierocks Oct 23, 2021
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
Prev Previous commit
Next Next commit
Explicit requirement of mapping format identifier
  • Loading branch information
jamierocks committed Jan 12, 2021
commit d9701b02fe3f01517998cba0beac78f0df7e52f8
8 changes: 8 additions & 0 deletions changelogs/0.6.0.md
Original file line number Diff line number Diff line change
@@ -50,6 +50,14 @@ extension with the new multiple file extension functionality (detailed below).

## Mapping Formats

### Registration

Mapping Formats are still registered by use of service loaders, populating a registry in
`MappingFormats` - however their registration key (identifier) is now more explicit, and
formats are able to provide a name. Implementations must now provide the following:
- Name (can be used by tools such as Symphony)
- Identifier (used as the registration key)

### File extensions

Mapping Formats can now specify multiple file extensions that are typical, this will allow
Original file line number Diff line number Diff line change
@@ -44,6 +44,16 @@
*/
public class EnigmaMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "enigma";
}

@Override
public String getName() {
return "Enigma";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new EnigmaReader(reader);
@@ -67,9 +77,4 @@ public Collection<String> getFileExtensions() {
));
}

@Override
public String toString() {
return "enigma";
}

}
Original file line number Diff line number Diff line change
@@ -41,6 +41,16 @@
*/
public class JsonMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "gson";
}

@Override
public String getName() {
return "Lorenz JSON";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new JsonReader(reader);
@@ -56,9 +66,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(JsonConstants.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "gson";
}

}
Original file line number Diff line number Diff line change
@@ -41,6 +41,16 @@
*/
public class JamMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "jam";
}

@Override
public String getName() {
return "JAM";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new JamReader(reader);
@@ -56,9 +66,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(JamConstants.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "jam";
}

}
Original file line number Diff line number Diff line change
@@ -42,6 +42,16 @@
*/
public class KinMappingFormat implements MappingFormat {

@Override
public String getIdentifier() {
return "kin";
}

@Override
public String getName() {
return "Kin";
}

@Override
public MappingsReader createReader(final InputStream stream) throws IOException {
return new KinReader(stream);
@@ -57,9 +67,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(KinConstants.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "kin";
}

}
Original file line number Diff line number Diff line change
@@ -41,6 +41,16 @@
*/
public class ProGuardFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "proguard";
}

@Override
public String getName() {
return "ProGuard";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new ProGuardReader(reader);
@@ -56,9 +66,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.empty();
}

@Override
public String toString() {
return "proguard";
}

}
18 changes: 18 additions & 0 deletions lorenz/src/main/java/org/cadixdev/lorenz/io/MappingFormat.java
Original file line number Diff line number Diff line change
@@ -44,6 +44,24 @@
*/
public interface MappingFormat {

/**
* Gets the internal identifier for this mapping format.
* <p>
* This will be used as the registration identifier for the format registry.
*
* @return The identifier
* @since 0.6.0
*/
String getIdentifier();

/**
* Gets the name of this mapping format.
*
* @return The name
* @since 0.6.0
*/
String getName();

/**
* Creates a {@link MappingsReader} from the given {@link InputStream}
* for the mapping format.
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ public final class MappingFormats {
static {
// Populate the registry
for (final MappingFormat format : ServiceLoader.load(MappingFormat.class)) {
REGISTRY.register(format.toString(), format);
REGISTRY.register(format.getIdentifier(), format);
}
}

Original file line number Diff line number Diff line change
@@ -41,6 +41,16 @@
*/
public class SrgMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "srg";
}

@Override
public String getName() {
return "SRG";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new SrgReader(reader);
@@ -56,9 +66,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(SrgConstants.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "srg";
}

}
Original file line number Diff line number Diff line change
@@ -42,6 +42,16 @@
*/
public class CSrgMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "csrg";
}

@Override
public String getName() {
return "CSRG";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new CSrgReader(reader);
@@ -57,9 +67,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(SrgConstants.CSrg.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "csrg";
}

}
Original file line number Diff line number Diff line change
@@ -42,6 +42,16 @@
*/
public class TSrgMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "tsrg";
}

@Override
public String getName() {
return "TSRG";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new TSrgReader(reader);
@@ -57,9 +67,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(SrgConstants.TSrg.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "tsrg";
}

}
Original file line number Diff line number Diff line change
@@ -42,6 +42,16 @@
*/
public class XSrgMappingFormat implements TextMappingFormat {

@Override
public String getIdentifier() {
return "xsrg";
}

@Override
public String getName() {
return "XSRG";
}

@Override
public MappingsReader createReader(final Reader reader) {
return new XSrgReader(reader);
@@ -57,9 +67,4 @@ public Optional<String> getStandardFileExtension() {
return Optional.of(SrgConstants.XSrg.STANDARD_EXTENSION);
}

@Override
public String toString() {
return "xsrg";
}

}