Replace reprod patched mixin with upstream + gradle task for fixing refmap

This commit is contained in:
Jonas Herzig
2018-02-21 12:51:33 +01:00
parent c5ad912a79
commit 2f96694a73
10 changed files with 26 additions and 295 deletions

View File

@@ -1,54 +0,0 @@
From c245b961e83176a1731a7eaf1f1f3ffbefa1afb7 Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Tue, 8 Aug 2017 19:08:56 +0200
Subject: [PATCH 2/7] Remove/replace all buildscript dependencies
---
build.gradle | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/build.gradle b/build.gradle
index e0c46ea..165dbe4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,13 +5,11 @@
}
dependencies {
- classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
// Apply plugin
apply plugin: 'java'
-apply plugin: 'license'
apply plugin: 'checkstyle'
apply plugin: 'maven'
apply plugin: 'eclipse'
@@ -170,23 +165,6 @@ tasks.withType(AbstractArchiveTask) {
from 'LICENSE.txt'
}
-// License header formatting
-license {
- ext {
- name = project.name
- organization = project.organization
- url = project.url
- }
- include '**/*.java'
- header file("HEADER.txt")
- sourceSets = project.sourceSets
- ignoreFailures false
- strictCheck true
- mapping {
- java = 'SLASHSTAR_STYLE'
- }
-}
-
checkstyle {
configProperties = [
"name" : project.name,
--
2.5.5

View File

@@ -1,25 +0,0 @@
From 0f250141ba6515dbeffeb0722bf29976850bb323 Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Tue, 8 Aug 2017 19:13:17 +0200
Subject: [PATCH 3/7] Fix for Gradle 3
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 165dbe4..0f189ec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -92,7 +92,7 @@ dependencies {
// Task to read ASM library and rename packages
task renamedASM {
- outputs.file files(configurations.asm.files.withIndex().collect { file, i -> def dep = configurations.asm.dependencies[i]
+ outputs.files files(configurations.asm.files.withIndex().collect { file, i -> def dep = configurations.asm.dependencies[i]
new File(new File(renamedPackageRoot, "org/spongepowered/mixin-" + dep.name + "/" + dep.version), "mixin-" + file.name).path
})
ant {
--
2.5.5

View File

@@ -1,42 +0,0 @@
From eb4fa04cf82067b20caa7222c154f8b6f7ab95ac Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Tue, 8 Aug 2017 19:13:45 +0200
Subject: [PATCH 4/7] Disable checkstyle
---
build.gradle | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/build.gradle b/build.gradle
index 0f189ec..f8598a3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,6 @@ buildscript {
// Apply plugin
apply plugin: 'java'
-apply plugin: 'checkstyle'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
@@ -165,17 +164,6 @@ tasks.withType(AbstractArchiveTask) {
from 'LICENSE.txt'
}
-checkstyle {
- configProperties = [
- "name" : project.name,
- "organization": project.organization,
- "url" : project.url,
- "year" : project.inceptionYear
- ]
- configFile = file("checkstyle.xml")
- toolVersion = '6.19'
-}
-
// Source compiler configuration
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path']
--
2.5.5

View File

@@ -1,25 +0,0 @@
From c66ba83e4b27f6f094c2dcdaaac095d3ca69b41c Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Tue, 8 Aug 2017 19:35:08 +0200
Subject: [PATCH 5/7] Replace fernflower SNAPSHOT depencency
---
build.gradle | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index f8598a3..e9a965b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -143,7 +143,7 @@ dependencies {
// Fernflower decompiler
fernflowerCompile configurations.compile
- fernflowerCompile 'org.jetbrains.java.decompiler:fernflower:sponge-SNAPSHOT'
+ fernflowerCompile 'reprod:fernflower:0'
// LegacyLauncher service
launchwrapperCompile configurations.compile
--
2.5.5

View File

@@ -1,56 +0,0 @@
From 6422d5985faeff394237a499e5529b765dd46b7e Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Tue, 8 Aug 2017 21:40:59 +0200
Subject: [PATCH 6/7] Use TreeMap in ReferenceMapper for reproducibility
---
.../java/org/spongepowered/asm/mixin/refmap/ReferenceMapper.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/spongepowered/asm/mixin/refmap/ReferenceMapper.java b/src/main/java/org/spongepowered/asm/mixin/refmap/ReferenceMapper.java
index 2a368e7..082b5dd 100644
--- a/src/main/java/org/spongepowered/asm/mixin/refmap/ReferenceMapper.java
+++ b/src/main/java/org/spongepowered/asm/mixin/refmap/ReferenceMapper.java
@@ -29,7 +29,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Serializable;
-import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.IOUtils;
@@ -71,13 +70,13 @@ public final class ReferenceMapper implements Serializable {
* by the AP. Each entry is keyed by the owning mixin, with the value map
* containing the actual remappings for each owner
*/
- private final Map<String, Map<String, String>> mappings = Maps.newHashMap();
+ private final Map<String, Map<String, String>> mappings = Maps.newTreeMap();
/**
* All mapping sets, keyed by environment type, eg. "notch", "searge". The
* format of each map within this map is the same as for {@link #mappings}
*/
- private final Map<String, Map<String, Map<String, String>>> data = Maps.newHashMap();
+ private final Map<String, Map<String, Map<String, String>>> data = Maps.newTreeMap();
/**
* True if this refmap cannot be written. Only true for the
@@ -191,13 +190,13 @@ public final class ReferenceMapper implements Serializable {
if (context != null) {
mappings = this.data.get(context);
if (mappings == null) {
- mappings = Maps.newHashMap();
+ mappings = Maps.newTreeMap();
this.data.put(context, mappings);
}
}
Map<String, String> classMappings = mappings.get(className);
if (classMappings == null) {
- classMappings = new HashMap<String, String>();
+ classMappings = Maps.newTreeMap();
mappings.put(className, classMappings);
}
return classMappings.put(reference, newReference);
--
2.5.5

View File

@@ -1,26 +0,0 @@
From c3d6d12f47bae3c12c597e59d9a69989fdaa9550 Mon Sep 17 00:00:00 2001
From: Jonas Herzig <me@johni0702.de>
Date: Fri, 25 Aug 2017 19:27:13 +0200
Subject: [PATCH] Do not include java version and user name in jar
---
build.gradle | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index debc97b..ae53e1b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -241,8 +241,7 @@ jar {
// JAR manifest configuration
manifest.mainAttributes(
- "Built-By": System.properties['user.name'],
- "Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
+ "Built-By": 'ReplayMod reprod',
"Implementation-Title": name,
"Implementation-Version": version + "+" + ciSystem + "-b" + buildNumber + ".git-" + commit,
"Implementation-Vendor": url,
--
2.13.2