[FG7] Add a way to configure Tools (Mavenizer/Slimelauncher)
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.
dependencies {
mavenizer "net.minecraftforge:minecraft-mavenizer:0.3.3"
slimelauncher "net.minecraftforge:slime-launcher:0.1.0"
implementation(minecraft.dep("net.minecraftforge:forge:1.21.5-55.0.23"))
}
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.
Closing because I added an experimental API that allows for this. The implementation details have yet to be finalized, but it works like this:
fgtools {
configure('mavenizer') {
classpath = configurations.detachedConfiguration(
dependencies.create('net.minecraftforge:minecraft-mavenizer:0.3.22')
)
}
}
classpath in this case is a ConfigurableFileCollection. I will not add helper methods for things like String artifacts because this is meant for advanced users only.