SKIE icon indicating copy to clipboard operation
SKIE copied to clipboard

Build Error When Enum Name Conflicts with KMP Library Name

Open sobaya-0141 opened this issue 5 months ago • 1 comments

The following template contains guiding questions that should help you provide as much helpful information as possible.

You don't have to follow the template, you can just write the bug report and check this template to see if the bug report answers all the relevant questions. Don't worry if you don't know some answers; we will help you find them if needed.

Questions:

What is the problem?

Build Error

When does the problem occur?

How do we reproduce the issue?

What is your SKIE Gradle configuration?

A build error occurs when the KMP library name and an enum constant name are the same.

Example:

kotlin {
    val xcfName = "hoge"  // This conflicts
    val xcf = XCFramework(xcfName)
    sourceSets.forEach {
        it.binaries.framework {
            baseName = xcfName
        }
    }
}
enum class Fuga {
    HOGE,  // This causes the build error
    SOBA,
}

What versions of SKIE, Kotlin, and Gradle do you use?

SKIE:0.8.4

sobaya-0141 avatar Sep 19 '24 00:09 sobaya-0141