Skip to content

Conversation

rbeazleyspot
Copy link
Contributor

This is to enable #1362.

With this change in place you can do something like

kt_compiler_plugin(
    name = "jetpack_compose_compiler_plugin",
    id = "androidx.compose.compiler.plugins.kotlin",
    options = {
        "sourceInformation": "true",  # Required for AS Layout Inspector, disable for release builds
        "stabilityConfigurationPath": "$(locations :stability_config)",
    },
    target_embedded_compiler = True,
    visibility = ["//visibility:public"],
    deps = [
        ":stability_config",
        "@maven_rules_kotlin_example//:org_jetbrains_kotlin_kotlin_compose_compiler_plugin_embeddable",
    ],
)

filegroup(
    name = "stability_config",
    srcs = ["stability.conf"],
)

I tested this by modifying examples/jetpack_compose //app:compose_example_app with a locally built version of the rules (the example code above was lifted from that)

@rbeazleyspot
Copy link
Contributor Author

@restingbull WDYT ? think it aligns with your current changes?

@restingbull
Copy link
Collaborator

I meant to follow the convention for data? deps is generally reserved for known types, rather than arbitrary files.

Though, we'll need to pull DefaultInfo off the deps as well. The data attribute has a bit of a cursed history.

@rbeazleyspot
Copy link
Contributor Author

I meant to follow the convention for data? deps is generally reserved for known types, rather than arbitrary files.

Though, we'll need to pull DefaultInfo off the deps as well. The data attribute has a bit of a cursed history.

i've tried this in #1364

i didnt add DefaultInfo to the deps, is it definitely needed?

@restingbull
Copy link
Collaborator

I meant to follow the convention for data? deps is generally reserved for known types, rather than arbitrary files.
Though, we'll need to pull DefaultInfo off the deps as well. The data attribute has a bit of a cursed history.

i've tried this in #1364

i didnt add DefaultInfo to the deps, is it definitely needed?
You need to merge the runfiles from each dependency to get their data dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants