Skip to content

Commit a5509a2

Browse files
committed
fixed CI workspace AT issue
1 parent b2bce27 commit a5509a2

File tree

4 files changed

+14
-55
lines changed

4 files changed

+14
-55
lines changed

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ repositories {
3535
}
3636
jcenter() // get as many deps from here as possible
3737
mavenCentral()
38+
39+
// because SS and its snapshot
40+
maven {
41+
name = "sonatype"
42+
url = "https://oss.sonatype.org/content/repositories/snapshots/"
43+
}
44+
3845

3946
// because of the GradleStart stuff
4047
maven {
@@ -67,7 +74,7 @@ dependencies {
6774
compile 'com.google.code.gson:gson:2.2.4' // Used instead of Argo for buuilding changelog.
6875
compile 'com.github.tony19:named-regexp:0.2.3' // 1.7 Named regexp features
6976

70-
compile 'net.md-5:SpecialSource:1.7.3' // deobf and reobs
77+
compile 'net.md-5:SpecialSource:1.7.4-SNAPSHOT' // deobf and reobs
7178

7279
// because curse
7380
compile 'org.apache.httpcomponents:httpclient:4.3.3'

src/main/java/net/minecraftforge/gradle/patcher/PatcherPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ else if (f.getName().endsWith(".srg"))
745745
else if (f.getName().endsWith("_at.cfg"))
746746
{
747747
// Add ATs for deobf in the same run.. why not...
748-
deobfJar.addTransformerClean(f);
748+
deobfJar.addTransformer(f);
749749
mergeFiles.addAt(f);
750750
}
751751
}

src/main/java/net/minecraftforge/gradle/tasks/DeobfuscateJar.java

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,6 @@ public class DeobfuscateJar extends CachedTask
8383

8484
private Object log;
8585

86-
private boolean isClean = true;
87-
88-
public void addTransformerClean(Object... obj)
89-
{
90-
for (Object object : obj)
91-
{
92-
ats.add(object);
93-
}
94-
}
95-
9686
/**
9787
* adds an access transformer to the deobfuscation of this
9888
* @param obj access transformers
@@ -103,11 +93,6 @@ public void addTransformer(Object... obj)
10393
{
10494
ats.add(object);
10595
}
106-
107-
if (obj.length > 0)
108-
{
109-
isClean = false;
110-
}
11196
}
11297

11398
@TaskAction
@@ -147,24 +132,6 @@ private void deobfJar(File inJar, File outJar, File srg, Collection<File> ats) t
147132
ErroringRemappingAccessMap accessMap = new ErroringRemappingAccessMap(new File[] { getMethodCsv(), getFieldCsv() });
148133

149134
getLogger().info("Using AccessTransformers...");
150-
// PrintStream tmp = System.out;
151-
// System.setOut(new PrintStream(new ByteArrayOutputStream()
152-
// {
153-
// @Override
154-
// public void write(int b)
155-
// {
156-
// }
157-
//
158-
// @Override
159-
// public void write(byte[] b, int off, int len)
160-
// {
161-
// }
162-
//
163-
// @Override
164-
// public void writeTo(OutputStream out) throws IOException
165-
// {
166-
// }
167-
// }));
168135
//Make SS shutup about access maps
169136
for (File at : ats)
170137
{
@@ -496,22 +463,6 @@ public void setMethodCsv(Object methodCsv)
496463
this.methodCsv = methodCsv;
497464
}
498465

499-
@Override
500-
protected boolean defaultCache()
501-
{
502-
return isClean;
503-
}
504-
505-
public boolean isClean()
506-
{
507-
return isClean;
508-
}
509-
510-
public void setDirty()
511-
{
512-
isClean = false;
513-
}
514-
515466
private static final class ErroringRemappingAccessMap extends AccessMap
516467
{
517468
private final Map<String, String> renames = Maps.newHashMap();
@@ -589,8 +540,9 @@ public void addAccessChange(String symbolString, String accessString)
589540
@Override
590541
protected void accessApplied(String key, int oldAccess, int newAccess)
591542
{
592-
// if the access' are equal, then the line is broken, and we dont want to remove it.
593-
if (oldAccess != newAccess)
543+
// if the access' are equal, then the line is broken, and we dont want to remove it.\
544+
// or not... it still applied.. just applied twice somehow.. not an issue.
545+
// if (oldAccess != newAccess)
594546
{
595547
// key added before is in format: package/class{method/field sig}
596548
// and the key here is in format: package/class {method/field sig}

src/main/java/net/minecraftforge/gradle/user/patcherUser/PatcherUserBasePlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public Boolean call()
7272
DeobfuscateJar deobfBin = (DeobfuscateJar) project.getTasks().getByName(TASK_DEOBF_BIN);
7373
DeobfuscateJar deobf = (DeobfuscateJar) project.getTasks().getByName(TASK_DEOBF);
7474

75-
deobfBin.addTransformerClean(delayedFile(AT_USERDEV));
76-
deobf.addTransformerClean(delayedFile(AT_USERDEV));
75+
deobfBin.addTransformer(delayedFile(AT_USERDEV));
76+
deobf.addTransformer(delayedFile(AT_USERDEV));
7777
}
7878

7979
// setup binpatching

0 commit comments

Comments
 (0)