This commit is contained in:
Leijurv 2019-01-02 21:08:31 -08:00
parent 816727d65b
commit 83e6b2fdfe
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -208,7 +208,7 @@ public class ProguardTask extends BaritoneGradleTask {
Objects.requireNonNull(extension); Objects.requireNonNull(extension);
// for some reason cant use Class.forName // for some reason cant use Class.forName
Class<?> class_baseExtension = extension.getClass().getSuperclass().getSuperclass().getSuperclass(); Class<?> class_baseExtension = extension.getClass().getSuperclass().getSuperclass().getSuperclass(); // <-- cursed
Field f_replacer = class_baseExtension.getDeclaredField("replacer"); Field f_replacer = class_baseExtension.getDeclaredField("replacer");
f_replacer.setAccessible(true); f_replacer.setAccessible(true);
Object replacer = f_replacer.get(extension); Object replacer = f_replacer.get(extension);