bazelbuild / rules_kotlin

Bazel rules for Kotlin
Apache License 2.0
329 stars 207 forks source link

[Feature Request] apoption support for KSP plugins #1104

Open xinzhengzhang opened 6 months ago

xinzhengzhang commented 6 months ago

In some ksp usage scenarios, you need to pass in apoption. But now rules does not implement this function. I tried to implement it with a options params. https://github.com/bazelbuild/rules_kotlin/pull/1103 Here's how it's used.

kt_ksp_plugin(
    name = "kotlin-native-coroutine-ksp",
    processor_class = "",
    deps = [
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_ksp",
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_annotations_jvm",
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_core_jvm"
    ],
    options = {
        "nativeCoroutines.suffix" : "Native",
        "nativeCoroutines.flowValueSuffix": "Value",
        "nativeCoroutines.flowReplayCacheSuffix": "ReplayCache",
        "nativeCoroutines.stateSuffix": "Value",
        "nativeCoroutines.stateFlowSuffix": "Flow",
    },
    visibility = ["//visibility:public"],
)
idanakav commented 5 months ago

See #1036 , it was never merged, we use it internally with no issues.

Bencodes commented 5 months ago

We use #1036 internally as well.

xinzhengzhang commented 5 months ago

I would like to ask if #1036 will be merged? It seems that the last update of this was last October

pswaminathan commented 5 months ago

We would also be very interested in a release with #1036 merged.