Skip to content
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

Update dependencies and make tests work #71

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

LexManos
Copy link
Member

Update GradleUtils which allows us to re-enable configuration cache.
Update Gradle wrapper, junit deps. and a few others

Rewrote the junit test project to actually load things into a transformed context and verify the coremods actually applied.

Fixes gradle cache
Rework test framework to actually test things
Copy link
Contributor

@PaintNinja PaintNinja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done some review on my phone and left some notes to revisit later. Overall looks good!

import cpw.mods.modlauncher.api.ITransformationService;
import cpw.mods.modlauncher.api.ITransformer;
import cpw.mods.modlauncher.api.IncompatibleEnvironmentException;
import org.jetbrains.annotations.NotNull;

import java.nio.file.FileSystems;
import java.util.Arrays;
import java.util.List;
import java.util.Set;

public class TestTransformerService implements ITransformationService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should look into bundling this with ModLauncher

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should but I don't want it exposed at runtime as it's fairly powerful api. So probably a test harness sub project

coremods-test/build.gradle Outdated Show resolved Hide resolved
@@ -25,7 +26,7 @@ repositories {
}

changelog {
fromTag "1.0.0"
from '1.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: investigate a bouncer method in GradleUtils to undo this breaking change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@Jonathing
Copy link
Member

Paint suggested a lot of code sanity changes, so I will wait for those to be applied before I start testing thoroughly. Everything looks good so far, and I actually have a framework to test raw ASM with, so thank you.

coremods-test/build.gradle Outdated Show resolved Hide resolved
coremods-test/build.gradle Outdated Show resolved Hide resolved
@Jonathing Jonathing merged commit 298ff2f into MinecraftForge:master Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants