File tree Expand file tree Collapse file tree
src/main/java/org/embeddedt/modernfix/common/mixin/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 run : ./scripts/tagcleaner.sh
4545 - name : Build ModernFix using Gradle
4646 run : ./gradlew build
47+ - name : Run mixin audit
48+ run : timeout 60 xvfb-run ./gradlew runAuditClient
4749 - name : Publish mod to CurseForge & Modrinth
4850 if : steps.check_branch.outputs.is_release == 'true'
4951 run : ./gradlew publishMods copyJarToBin
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ legacyForge {
3838 create(" server" ) {
3939 server()
4040 }
41+ create(" auditClient" ) {
42+ client()
43+ jvmArguments.addAll(" -Dmodernfix.auditAndExit=true" , " -Djava.awt.headless=true" )
44+ }
4145 }
4246
4347 mods {
Original file line number Diff line number Diff line change 88import org .embeddedt .modernfix .util .TimeFormatter ;
99import org .spongepowered .asm .mixin .Final ;
1010import org .spongepowered .asm .mixin .Mixin ;
11+ import org .spongepowered .asm .mixin .MixinEnvironment ;
1112import org .spongepowered .asm .mixin .Shadow ;
1213import org .spongepowered .asm .mixin .injection .At ;
1314import org .spongepowered .asm .mixin .injection .Inject ;
@@ -27,6 +28,13 @@ private static void doModernFixBootstrap(CallbackInfo ci) {
2728 LOGGER .info ("ModernFix reached bootstrap stage ({} after launch)" , TimeFormatter .formatNanos (ManagementFactory .getRuntimeMXBean ().getUptime () * 1000L * 1000L ));
2829 ModWorkManagerQueue .replace ();
2930 ManifestCompactor .compactManifests ();
31+ boolean auditAndExit = Boolean .getBoolean ("modernfix.auditAndExit" );
32+ if (auditAndExit || Boolean .getBoolean ("modernfix.auditMixinsAtStart" )) {
33+ MixinEnvironment .getCurrentEnvironment ().audit ();
34+ if (auditAndExit ) {
35+ System .exit (0 );
36+ }
37+ }
3038 }
3139 }
3240
You can’t perform that action at this time.
0 commit comments