bazelbuild / rules_kotlin

Bazel rules for Kotlin
Apache License 2.0
333 stars 209 forks source link

@Parcelize not recognized in Android Studio #690

Open ViktorPetrovski opened 2 years ago

ViktorPetrovski commented 2 years ago

Android studio is complaining about @Parcelize although the code builds successfully without any issues.

Screenshot 2022-03-04 at 09 28 33

I will share the Build file in case:

load("//tools/jvm:kt.bzl", "kt_compiler_plugin", "kt_jvm_library")

kt_compiler_plugin(
    name = "parcelize_plugin",
    compile_phase = True,
    id = "org.jetbrains.kotlin.parcelize",
    stubs_phase = True,
    visibility = ["//third_party/jvm_plugins:__pkg__"],
    deps = [
        "@com_github_jetbrains_kotlin//:parcelize-compiler-plugin",
    ],
)

kt_jvm_library(
    name = "parcelize",
    srcs = [],
    exported_compiler_plugins = [":parcelize_plugin"],
    plugins = [
        ":parcelize_plugin",
    ],
    visibility = ["//third_party/jvm_plugins:__pkg__"],
    exports = [
        "@com_github_jetbrains_kotlin//:parcelize-runtime",
    ],
)

I'm currently on Android Studio Bumblebee, but this has been a problem for months we just never had the time to take a look so it was an issue on other versions of AS as well

restingbull commented 2 years ago

@nkoroste

ViktorPetrovski commented 2 years ago

I've also cloned the rules_kotlin repository and tried to build examples/plugin/parcelize, but the same error is shown. image

nkoroste commented 2 years ago

@restingbull I tested it internally with our modifications to the plugin but this is still an issues unfortunately

nikolai-manzhos commented 1 year ago

Any updates on this one? Still facing the same error

AlexBurdu commented 1 year ago

Is this a regression in the plugin? I added the original rules, but back then I didn't get any error in the IDE