Commit c65f1431b2dab8caba92658ed3e78ab040e4cc35
1 parent
7d6e88cd
Update to mixin 0.5.6
Showing
4 changed files
with
13 additions
and
6 deletions
build.gradle
| @@ -72,7 +72,7 @@ repositories { | @@ -72,7 +72,7 @@ repositories { | ||
| 72 | 72 | ||
| 73 | dependencies { | 73 | dependencies { |
| 74 | // compile 'org.ow2.asm:asm-debug-all:5.0.3' | 74 | // compile 'org.ow2.asm:asm-debug-all:5.0.3' |
| 75 | - compile('org.spongepowered:mixin:0.5.5-SNAPSHOT') { | 75 | + compile('org.spongepowered:mixin:0.5.6-SNAPSHOT') { |
| 76 | exclude module: 'asm-commons' | 76 | exclude module: 'asm-commons' |
| 77 | exclude module: 'asm-tree' | 77 | exclude module: 'asm-tree' |
| 78 | exclude module: 'launchwrapper' | 78 | exclude module: 'launchwrapper' |
| @@ -270,8 +270,8 @@ artifacts { | @@ -270,8 +270,8 @@ artifacts { | ||
| 270 | task deploy(type: Copy, dependsOn: build) { | 270 | task deploy(type: Copy, dependsOn: build) { |
| 271 | def libraryDir = new File(new File(System.env.APPDATA), ".minecraft/libraries") | 271 | def libraryDir = new File(new File(System.env.APPDATA), ".minecraft/libraries") |
| 272 | from shadowJar.outputs.files[0] | 272 | from shadowJar.outputs.files[0] |
| 273 | - into new File(libraryDir, sprintf('%1$s%4$s%2$s%4$s%3$s', project.group.replace('.', File.separator), archivesBaseName, buildVersion, File.separatorChar)) | ||
| 274 | - rename shadowJar.outputs.files[0].name, sprintf("%s-%s.jar", archivesBaseName, buildVersion) | 273 | + into new File(libraryDir, sprintf('%1$s%4$s%2$s%4$s%3$s', project.group.replace('.', File.separator), archivesBaseName, version, File.separatorChar)) |
| 274 | + rename shadowJar.outputs.files[0].name, sprintf("%s-%s.jar", archivesBaseName, version) | ||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | uploadArchives { | 277 | uploadArchives { |
src/main/java/com/mumfrey/liteloader/api/MixinConfigProvider.java
| @@ -15,7 +15,10 @@ public interface MixinConfigProvider | @@ -15,7 +15,10 @@ public interface MixinConfigProvider | ||
| 15 | /** | 15 | /** |
| 16 | * Get the minimum required mixin operating compatibility level for this | 16 | * Get the minimum required mixin operating compatibility level for this |
| 17 | * API, can return null. | 17 | * API, can return null. |
| 18 | + * | ||
| 19 | + * @deprecated Specify level in configs | ||
| 18 | */ | 20 | */ |
| 21 | + @Deprecated | ||
| 19 | public abstract CompatibilityLevel getCompatibilityLevel(); | 22 | public abstract CompatibilityLevel getCompatibilityLevel(); |
| 20 | 23 | ||
| 21 | /** | 24 | /** |
src/main/java/com/mumfrey/liteloader/api/manager/APIProviderBasic.java
| @@ -15,6 +15,7 @@ import java.util.regex.Matcher; | @@ -15,6 +15,7 @@ import java.util.regex.Matcher; | ||
| 15 | 15 | ||
| 16 | import org.spongepowered.asm.mixin.MixinEnvironment; | 16 | import org.spongepowered.asm.mixin.MixinEnvironment; |
| 17 | import org.spongepowered.asm.mixin.MixinEnvironment.CompatibilityLevel; | 17 | import org.spongepowered.asm.mixin.MixinEnvironment.CompatibilityLevel; |
| 18 | +import org.spongepowered.asm.mixin.Mixins; | ||
| 18 | 19 | ||
| 19 | import com.mumfrey.liteloader.api.CoreProvider; | 20 | import com.mumfrey.liteloader.api.CoreProvider; |
| 20 | import com.mumfrey.liteloader.api.LiteAPI; | 21 | import com.mumfrey.liteloader.api.LiteAPI; |
| @@ -86,7 +87,7 @@ class APIProviderBasic implements APIProvider, APIAdapter | @@ -86,7 +87,7 @@ class APIProviderBasic implements APIProvider, APIAdapter | ||
| 86 | { | 87 | { |
| 87 | for (String config : configs) | 88 | for (String config : configs) |
| 88 | { | 89 | { |
| 89 | - MixinEnvironment.getDefaultEnvironment().addConfiguration(config); | 90 | + Mixins.addConfiguration(config); |
| 90 | } | 91 | } |
| 91 | } | 92 | } |
| 92 | 93 | ||
| @@ -95,7 +96,7 @@ class APIProviderBasic implements APIProvider, APIAdapter | @@ -95,7 +96,7 @@ class APIProviderBasic implements APIProvider, APIAdapter | ||
| 95 | { | 96 | { |
| 96 | for (String handlerName : errorHandlers) | 97 | for (String handlerName : errorHandlers) |
| 97 | { | 98 | { |
| 98 | - MixinEnvironment.getDefaultEnvironment().registerErrorHandlerClass(handlerName); | 99 | + Mixins.registerErrorHandlerClass(handlerName); |
| 99 | } | 100 | } |
| 100 | } | 101 | } |
| 101 | } | 102 | } |
src/main/java/com/mumfrey/liteloader/core/LiteLoaderEnumerator.java
| @@ -22,6 +22,7 @@ import java.util.Set; | @@ -22,6 +22,7 @@ import java.util.Set; | ||
| 22 | 22 | ||
| 23 | import org.spongepowered.asm.mixin.MixinEnvironment; | 23 | import org.spongepowered.asm.mixin.MixinEnvironment; |
| 24 | import org.spongepowered.asm.mixin.MixinEnvironment.Phase; | 24 | import org.spongepowered.asm.mixin.MixinEnvironment.Phase; |
| 25 | +import org.spongepowered.asm.mixin.Mixins; | ||
| 25 | 26 | ||
| 26 | import com.google.common.base.Throwables; | 27 | import com.google.common.base.Throwables; |
| 27 | import com.mumfrey.liteloader.LiteMod; | 28 | import com.mumfrey.liteloader.LiteMod; |
| @@ -644,7 +645,7 @@ public class LiteLoaderEnumerator implements LoaderEnumerator | @@ -644,7 +645,7 @@ public class LiteLoaderEnumerator implements LoaderEnumerator | ||
| 644 | if (config.endsWith(".json")) | 645 | if (config.endsWith(".json")) |
| 645 | { | 646 | { |
| 646 | LiteLoaderLogger.info(Verbosity.REDUCED, "Registering mixin config %s for %s", config, container.getName()); | 647 | LiteLoaderLogger.info(Verbosity.REDUCED, "Registering mixin config %s for %s", config, container.getName()); |
| 647 | - MixinEnvironment.getDefaultEnvironment().addConfiguration(config); | 648 | + Mixins.addConfiguration(config); |
| 648 | this.injectContainerRecursive(container); | 649 | this.injectContainerRecursive(container); |
| 649 | } | 650 | } |
| 650 | else if (config.contains(".json@")) | 651 | else if (config.contains(".json@")) |
| @@ -656,6 +657,8 @@ public class LiteLoaderEnumerator implements LoaderEnumerator | @@ -656,6 +657,8 @@ public class LiteLoaderEnumerator implements LoaderEnumerator | ||
| 656 | if (phase != null) | 657 | if (phase != null) |
| 657 | { | 658 | { |
| 658 | LiteLoaderLogger.info(Verbosity.REDUCED, "Registering mixin config %s for %s", config, container.getName()); | 659 | LiteLoaderLogger.info(Verbosity.REDUCED, "Registering mixin config %s for %s", config, container.getName()); |
| 660 | + LiteLoaderLogger.warning("%s specifies mixin environment in metadata which is deprecated, use config instead", | ||
| 661 | + container.getName()); | ||
| 659 | MixinEnvironment.getEnvironment(phase).addConfiguration(config); | 662 | MixinEnvironment.getEnvironment(phase).addConfiguration(config); |
| 660 | this.injectContainerRecursive(container); | 663 | this.injectContainerRecursive(container); |
| 661 | } | 664 | } |