James Hendry
01/11/2022, 3:13 PMJoffrey
01/11/2022, 3:36 PMVampire
01/11/2022, 3:47 PMplugins
dsl.
If you apply using the legacy way, then no accessors are generated for applied plugins, so there is no minecraft
accessor that you could use.
The recommendation is, that you use the plugins
dsl to apply the plugin, because then you get for Koltin DSL build scripts and precompiled script plugins accessors generated for extensions added by those plugins.
If you for whatever reason insist on using the legacy way to apply the plugin, then you need to use the uglier verbose syntax like
configure<MinecraftExtension> {
...
}
or whatever the class name of that extension is.Joffrey
01/11/2022, 3:51 PMIf you apply using the legacy way, then no accessors are generated for applied plugins, so there is noTIL that this doesn't only apply to the IDE 😄 thanksaccessor that you could use.minecraft
James Hendry
01/11/2022, 5:30 PMVampire
01/11/2022, 6:41 PMapply(plugin = "net.minecraftforge.gradle")
configure<MinecraftExtension> {
mappings("official", "1.18.1")
}
val minecraft by configurations.getting
dependencies {
minecraft("net.minecraftforge:forge:1.18.1-39.0.14")
}
or
apply(plugin = "net.minecraftforge.gradle")
configure<MinecraftExtension> {
mappings(mapOf("channel" to "official", "version" to "1.18.1"))
}
val minecraft by configurations.getting
dependencies {
minecraft("net.minecraftforge:forge:1.18.1-39.0.14")
}
is what you want