Skip to content

Split tests into sub-project and add multi-release example#83

Open
LexManos wants to merge 1 commit intoMinecraftForge:2.0from
LexManos:multi-release
Open

Split tests into sub-project and add multi-release example#83
LexManos wants to merge 1 commit intoMinecraftForge:2.0from
LexManos:multi-release

Conversation

@LexManos
Copy link
Copy Markdown
Member

@LexManos LexManos commented Mar 29, 2026

This is done as an example for paint
The basic concept when working with multi-projects is that they can only talk to eachother using exposed configurations.
By default gradle exposes the normal jar task as a configuration
I add a 'multirelease' config with a custom USAGE so that it can be identified by things that want to work with the full MR jar. In this case its just the test project. That way we can test running the junit tests with different java versions.

As for building the multi release jar itself. That is done simply by having each java version have its own sub-project.
Then the main project has a config for that version with one non-transitive dependency on the sub-project.
We can then work with that config as normal and gradle is happy.

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.

1 participant