Skip to content

Fabric build.gradle.kts project property type error #2588

@TeAnli

Description

@TeAnli

Minecraft Development for IntelliJ plugin version

1.8.11

IntelliJ version

2025.3.1

Operating System

Windows x64

Target platform

Fabric

Description of the bug

When i use the IDEA plugin create a kotlin fabric mod and load gradle project, the default build.gradle.kt file will throw a error in task processResources

in build.gradle.kt

tasks.processResources {
    inputs.property("version", project.version)
    inputs.property("minecraft_version", project.property("minecraft_version"))
    inputs.property("loader_version", project.property("loader_version"))
    filteringCharset = "UTF-8"

    filesMatching("fabric.mod.json") {
        expand(
            "version" to project.version as String,
            "minecraft_version" to project.property("minecraft_version"),
            "loader_version" to project.property("loader_version"),
            "kotlin_loader_version" to project.property("kotlin_loader_version")
        )
    }
}
Image

I have to add type cast code to fix this problem.
like this

"minecraft_version" to project.property("minecraft_version") as String,
"loader_version" to project.property("loader_version") as String,
"kotlin_loader_version" to project.property("kotlin_loader_version") as String

please fix it, thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions