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

Replace NG use by a custom neodev plugin built on top of NFRT and MDG #1485

Draft
wants to merge 20 commits into
base: 1.21.x
Choose a base branch
from

Conversation

Technici4n
Copy link
Member

@Technici4n Technici4n commented Aug 24, 2024

This PR replaces our use of NG by a custom plugin that is based on NFRT and MDG, and lives in the buildSrc/ folder.

The main advantages are as follows:

  • Make continued development of the plugin, and by extension of a lot of our toolchain, easier, by integrating it into the same repository as NeoForge itself.
    • Large changes to the Gradle setup do not require us to start a new major version of the plugin that modders are using.
  • Reduce the unnecessary complexity that would come with wanting to design "DSLs" for every aspect of neodev.
  • Make further experiments (binpatch changes, split sources, includeBuild for NeoForge, etc...) easier to develop and deliver.
  • Thanks to NFRT, the asset folder from various launchers is reused.

TODO:

  • Eclipse support
  • Junit runs and our own junit tests
  • Server installer
  • A lot more testing!
  • Big pass(es) of cleanup to simplify even more.
    • Decide how to manage versions.
    • Other cleanup.
  • Integrate related MDG changes (Changes to support the NeoForge repo's custom plugin ModDevGradle#141), and decide on a policy to keep them reasonably stable.
  • Update DiffPatch to io.codechicken variant.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@neoforged-automation
Copy link

@Technici4n, this pull request has conflicts, please resolve them for this PR to move forward.

Comment on lines +42 to +53
// Remove src/ sources from the root project. They are used in the neoforge subproject.
sourceSets {
main {
java {
srcDirs = []
}
resources {
srcDirs = []
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this previously done in NG?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it wasn't necessary because the java plugin wasn't getting applied to the root project? I'm not sure why I had to apply java, I think it's for the neodev plugin. We shouldn't need the neodev plugin for the root project though.

@@ -3,6 +3,7 @@ import java.util.regex.Pattern

plugins {
id 'net.neoforged.gradleutils' version '3.0.0'
id 'net.neoforged.neodev'
Copy link
Member Author

Choose a reason for hiding this comment

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

Should probably be apply false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants