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
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: jamierocks
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ fabric.properties
### Lorenz ##
lorenz*/build/
lorenz*/out/
run/
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Jamie Mansfield <[email protected]>
<[email protected]> <[email protected]>
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ jdk:
- oraclejdk8

script: ./gradlew build
after_success: '[[ "$TRAVIS_BRANCH" = "develop" ]] && ./gradlew uploadArchives'
after_success:
- '[[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" = "develop" ]] && ./gradlew uploadArchives'

# Ugh.
notifications:
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ supports a variety of mapping formats:
- SRG and its variants (CSRG, TSRG, and XSRG)
- Enigma (through `lorenz-io-enigma`)
- JAM (through `lorenz-io-jam`)
- Kin (through `lorenz-io-kin`)
- ProGuard (**reader only** through `lorenz-io-proguard`)

## Branches
Expand Down Expand Up @@ -79,5 +78,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

## Discuss

**Found an issue with Lorenz?** [Make an issue]! We'd rather close invalid
reports than have bugs go unreported :)

We have an IRC channel on [EsperNet], `#cadix`, which is available for all
[registered](https://esper.net/getting_started.php#registration) users to join
and discuss Lorenz and other Cadix projects.

[git-flow]: https://nvie.com/posts/a-successful-git-branching-model/
[Sonatype's OSS repository]: https://oss.sonatype.org/content/repositories/snapshots/
[Make an issue]: https://github.com/CadixDev/Lorenz/issues/new
[EsperNet]: https://esper.net/
20 changes: 19 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@ import org.cadixdev.gradle.licenser.LicenseExtension

plugins {
`java-library`
jacoco
id("org.cadixdev.licenser") version "0.5.0" apply false
}

val projectName: String by project
val projectUrl: String by project
val projectInceptionYear: String by project
val bombeVersion: String by project
val groovyVersion: String by project
val spockVersion: String by project

val isSnapshot = version.toString().endsWith("-SNAPSHOT")

allprojects {
group = "org.cadixdev"
version = "0.5.7"
version = "0.6.0-SNAPSHOT"
}

subprojects {
apply<JavaLibraryPlugin>()
apply<GroovyPlugin>()
apply<JacocoPlugin>()
apply<MavenPublishPlugin>()
apply<Licenser>()

Expand All @@ -31,9 +36,14 @@ subprojects {
}

dependencies {
// Standard JUnit
testImplementation(platform("org.junit:junit-bom:5.7.0"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-engine")

// Spock
testImplementation("org.codehaus.groovy:groovy-all:$groovyVersion")
testImplementation("org.spockframework:spock-core:$spockVersion")
}

java {
Expand All @@ -60,6 +70,14 @@ subprojects {
useJUnitPlatform()
}

tasks.jacocoTestReport {
reports {
xml.isEnabled = false
csv.isEnabled = false
html.destination = file("${buildDir}/jacocoHtml")
}
}

tasks.processResources {
from(rootProject.file("LICENSE.txt"))
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changelogs/0.4.1.md → changelogs/0.4/0.4.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This version of Lorenz addresses a critical bug in the Enigma writer, that cause
output (totally broken).

### Broken

```
CLASS none/aet

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions changelogs/0.5.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Lorenz 0.5.8
===

## Fixes

- [GH-53]\: Don't de-obfuscate field types twice, which can cause
invalid output in some conditions.

[GH-53]: https://github.com/CadixDev/Lorenz/issues/53
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 72 additions & 0 deletions changelogs/0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Lorenz 0.6.0
============

## Groovy DSL

Lorenz now has a Groovy DSL, that simplifies the creation of mappings.

```groovy
def EXTRA = new ExtensionKey(String, 'extra')

def mappings = MappingSetDsl.create {
klass('a') {
deobf = 'Demo'
extension EXTRA, 'demo data'

field('g') { deobf = 'name' }

method('h', '(Z)Ljava/lang/String;') {
deobf = 'getName'

param(0) { deobf = 'example' }
}
}
}
```

To use the Groovy DSL, simply add `org.cadixdev:lorenz-dsl-groovy:0.6.0` to your build
tool.

## ASM Module

Inline with changes made in Bombe 0.4.0, the ASM package is no more - with both classes
now available under the same package in the core Lorenz module.

## Enigma Module

The Enigma mapping format no longer erroneously reports the standard file extension as
being "enigma", but rather the standard (as set by cuchaz's mapping project, and continued
by the Fabric Project) "mapping". The former file extension is included as a supported file
extension with the new multiple file extension functionality (detailed below).

Additionally, we now have support for reading/writing Fabric's fork of the format,
registered as `fabric-engima`. This implements the two major format changes made by the
Fabric Project: 1. the removal of the `none/` prefix for un-packaged classes, and 2. not using
the fully qualified name for inner classes (i.e. with the parent class' name).

## 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
tools such as Symphony and Nocturne to give richer (and more useful) file choice dialogs.

### Miscellaneous

- Mapping formats can now specify whether they support reading and writing. This will allow
tools, for example, to only show supported formats in a file save or file read dialog
- The Kin IO module has been removed.

## Conveniences

- `Mapping#set(key, value)` now returns the `Mapping` allowing for fluent method calls.
- The de-obfuscated names of `Mapping`s are now observable, through
`Mapping#addListener(MappingChangedListener)`.
68 changes: 68 additions & 0 deletions etc/codestyle-intellij.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<code_scheme name="jr2019" version="173">
<GroovyCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="true" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<package name="java" withSubpackages="true" static="false" />
</value>
</option>
</GroovyCodeStyleSettings>
<JavaCodeStyleSettings>
<option name="GENERATE_FINAL_LOCALS" value="true" />
<option name="GENERATE_FINAL_PARAMETERS" value="true" />
<option name="REPLACE_INSTANCEOF_AND_CAST" value="true" />
<option name="CLASS_NAMES_IN_JAVADOC" value="3" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="" withSubpackages="true" static="true" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<package name="java" withSubpackages="true" static="false" />
</value>
</option>
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value />
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="100" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="100" />
</JetCodeStyleSettings>
<codeStyleSettings language="Groovy">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
</codeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="BLANK_LINES_BEFORE_CLASS_END" value="1" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
</codeStyleSettings>
</code_scheme>
7 changes: 6 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ projectUrl = https://www.cadixdev.org/
projectInceptionYear = 2016

# Build Settings
bombeVersion = 0.3.4
javaVersion = 1.8
groovyVersion = 3.0.7
asmVersion = 7.1
bombeVersion = 0.5.0-SNAPSHOT
junitVersion = 5.5.1
spockVersion = 2.0-M4-groovy-3.0
10 changes: 0 additions & 10 deletions lorenz-asm/build.gradle.kts

This file was deleted.

4 changes: 0 additions & 4 deletions lorenz-asm/gradle.properties

This file was deleted.

14 changes: 14 additions & 0 deletions lorenz-dsl-groovy/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
`java-library`
}

val groovyVersion: String by rootProject

dependencies {
implementation("org.codehaus.groovy:groovy:$groovyVersion")
api(project(":lorenz"))
}

tasks.jar.configure {
manifest.attributes(mapOf("Automatic-Module-Name" to "${project.group}.lorenz.dsl.groovy"))
}
4 changes: 4 additions & 0 deletions lorenz-dsl-groovy/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
projectName = Lorenz-DSL-Groovy
description = A DSL for easing use of Lorenz within Groovy projects.
projectUrl = https://www.jamiemansfield.me/projects/lorenz
projectInceptionYear = 2019
Loading