Skip to content

Commit

Permalink
Support TinyV2 in Stitch (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfudge authored and sfPlayer1 committed Nov 3, 2019
1 parent d0b8e9d commit 9010d52
Show file tree
Hide file tree
Showing 44 changed files with 945,004 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local/
.gradle/
out/
build/
.idea/
23 changes: 15 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sourceCompatibility = 1.8

def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
version = version + "." + "${System.getenv().BUILD_NUMBER}"
version = version + "." + "${System.getenv().BUILD_NUMBER}"

This comment has been minimized.

Copy link
@natanfudge

natanfudge Nov 3, 2019

Author Contributor

I meant to get rid of the 99% of the test mappings but I guess this works

}

group = 'net.fabricmc'
Expand All @@ -39,34 +39,37 @@ dependencies {
compile 'org.ow2.asm:asm-commons:7.1'
compile 'org.ow2.asm:asm-tree:7.1'
compile 'org.ow2.asm:asm-util:7.1'
compile 'net.fabricmc:tiny-mappings-parser:0.1.1.8'
compile 'net.fabricmc:tiny-mappings-parser:0.2.0.11'
implementation group: 'org.checkerframework', name: 'checker-qual', version: '2.5.7'
implementation('cuchaz:enigma:0.14.0.120') {
implementation('cuchaz:enigma:0.14.2.138') {
exclude group: 'org.ow2.asm'
}

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}

apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/maven.gradle'
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/license.gradle'

jar {
manifest {
attributes 'Implementation-Title': 'Stitch',
attributes 'Implementation-Title': 'Stitch',
'Implementation-Version': version,
'Main-Class': "net.fabricmc.stitch.Main"
}
}

task allJar(type: Jar) {
from {
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Implementation-Title': 'Stitch',
'Implementation-Version': version,
'Main-Class': "net.fabricmc.stitch.Main"
attributes 'Implementation-Title': 'Stitch',
'Implementation-Version': version,
'Main-Class': "net.fabricmc.stitch.Main"
}
classifier = 'all'
with jar
Expand Down Expand Up @@ -98,3 +101,7 @@ publishing {
}
}
}

test {
useJUnitPlatform()
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = stitch
description = Fabric auxillary Tiny tools
url = https://github.com/FabricMC/stitch
version = 0.2.1
version = 0.3.0
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 16 01:28:54 BST 2016
#Mon Sep 16 17:37:29 IDT 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
6 changes: 6 additions & 0 deletions src/main/java/net/fabricmc/stitch/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
package net.fabricmc.stitch;

import net.fabricmc.stitch.commands.*;
import net.fabricmc.stitch.commands.tinyv2.CommandMergeTinyV2;
import net.fabricmc.stitch.commands.tinyv2.CommandProposeV2FieldNames;
import net.fabricmc.stitch.commands.tinyv2.CommandReorderTinyV2;

import java.util.Locale;
import java.util.Map;
Expand All @@ -40,6 +43,9 @@ public static void addCommand(Command command) {
addCommand(new CommandReorderTiny());
addCommand(new CommandRewriteIntermediary());
addCommand(new CommandUpdateIntermediary());
addCommand(new CommandReorderTinyV2());
addCommand(new CommandMergeTinyV2());
addCommand(new CommandProposeV2FieldNames());
}

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@

package net.fabricmc.stitch.commands;

import com.google.common.base.Joiner;
import net.fabricmc.mappings.ClassEntry;
import net.fabricmc.mappings.EntryTriple;
import net.fabricmc.mappings.FieldEntry;
import net.fabricmc.mappings.Mappings;
import net.fabricmc.mappings.MappingsProvider;
import net.fabricmc.mappings.MethodEntry;
import net.fabricmc.stitch.Command;
import net.fabricmc.stitch.representation.JarReader;
import net.fabricmc.stitch.representation.JarRootEntry;

import java.io.BufferedWriter;
import java.io.File;
Expand Down
Loading

0 comments on commit 9010d52

Please sign in to comment.