-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a subproject with a JUnit session listener #54
Conversation
loader/src/main/java/net/neoforged/fml/loading/targets/JUnitDevLaunchTarget.java
Show resolved
Hide resolved
loader/src/main/java/net/neoforged/fml/loading/targets/JUnitDevLaunchTarget.java
Outdated
Show resolved
Hide resolved
loader/src/main/java/net/neoforged/fml/loading/targets/JUnitUserDevLaunchTarget.java
Outdated
Show resolved
Hide resolved
Outside of some documentation as to what the components do, this is good from my end. |
junit/src/main/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also want to see the NeoForge PR using this. ;)
In reality it will almost always not be on module path
Technici4n ***@***.***> schrieb am Di., 23. Jan. 2024, 14:53:
… ***@***.**** commented on this pull request.
------------------------------
In
junit/src/main/resources/META-INF/services/org.junit.platform.launcher.LauncherSessionListener
<#54 (comment)>
:
> @@ -0,0 +1 @@
+net.neoforged.fml.junit.JUnitService
Any reason to specify the services both in the module-info and in
META-INF? Do we expect users to launch this outside of the module path?
—
Reply to this email directly, view it on GitHub
<#54 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJT6V2GBNKB2DKDWQJDUITYP66FLAVCNFSM6AAAAABAW3XOEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMZYHA2DSMJWGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Last commit published: 8a40ebc2d39104fce7bbc0a0b510bfef191af0a4. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #54' // https://github.com/neoforged/FancyModLoader/pull/54
url 'https://prmaven.neoforged.net/FancyModLoader/pr54'
content {
includeModule('net.neoforged.fancymodloader', 'earlydisplay')
includeModule('net.neoforged.fancymodloader', 'junit-fml')
includeModule('net.neoforged.fancymodloader', 'loader')
}
}
} |
This will let frameworks like mixin define additional packages in the GAME layer for runtime generated classes with the following additional code in a transformation service: ```java @OverRide public List<Resource> completeScan(final IModuleLayerManager layerManager) { try { return List.of( new Resource(IModuleLayerManager.Layer.GAME, List.of( new VirtualJar( "mixin_generated_classes", Path.of(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()), Constants.SYNTHETIC_PACKAGE, Constants.SYNTHETIC_PACKAGE + ".args")))); } catch (URISyntaxException e) { throw new RuntimeException(e); } ``` Fixes McModLauncher/modlauncher#90. Tested with a forgedev `@ModifyArgs` mixin :) --------- Co-authored-by: Matyrobbrt <[email protected]>
Will allow running JUnits in a bootstrapped Minecraft environment.