-
-
Notifications
You must be signed in to change notification settings - Fork 452
[FG7] Add a way to configure Tools (Mavenizer/Slimelauncher) #971
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
base: FG_7.0
Are you sure you want to change the base?
[FG7] Add a way to configure Tools (Mavenizer/Slimelauncher) #971
Conversation
There are a couple of things about your implementation I don't like. But with regards to what we want to add, I do like this. Originally, I was planning something like this: minecraft {
mavenizer = 'me.jonathing:mavenizer:0.3.0'
} But this works better. I do think I need to clean up a bit of my code with the Tools enum, it's not entirely finished. |
I did it this way, as to not change any method signatures, just add new ones, as I was not entirely sure how you wanted to deal with it. I can go thru everything (my impl) and clean it up for you, if you would like to. |
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 think this whole bit might be better in an extension. I'm still thinking of potentially an alternate implementation? One that looks like this:
dependencies {
fgTools.mavenizer 'me.jonathing:mavenizer:0.3.0'
}
To do that, I'd need to make a new extension for DependencyHandler
that returns configurations. If you'd like to present your own take on this, feel free.
project.getConfigurations().register(tool.getConfiguration()) { | ||
it.setTransitive(false) // Cant be transitive, maybe allow it to be later? | ||
it.setVisible(true) | ||
} |
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.
For the record, this absolutely can be transitive. Instead of having Tools return a Provider<File>
, it would instead be better to use the configuration you created in ForgeGradlePlugin
, add the default tool to that configuration, and then use that as the classpath in the task.
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.
Ah great! I will fix that.
This is mainly a PR to discuss the most ideal way of handling the configurability of these tools that FG7 uses.
The build script would look like this, to override a tool.