Skip to content

Conversation

Bencodes
Copy link
Collaborator

In order to support Jetpack Compose we need to support enabling the experimental IR backend.

Compose setup examples: https://developer.android.com/jetpack/androidx/releases/compose#declaring_dependencies
Docs for the new IR backend: https://kotlinlang.org/docs/reference/whatsnew14.html#new-jvm-ir-backend

@google-cla
Copy link

google-cla bot commented Nov 10, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Bencodes
Copy link
Collaborator Author

@googlebot I signed it!

if opts.x_use_experimental:
flags.append("-Xuse-experimental=kotlin.Experimental")
if opts.x_use_ir:
flags.append("-Xuse-ir")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's it? We don't need extra libs or some such?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra libs that are needed can be provided via compiler plugins

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For IR or compose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For compose. The new IR backend is just the new compiler backend that Jetbrains has been working on. Jetpack Compose is a compiler plugin that was built to leverage the new backend (enabled via -Xplugin=... or kt_compiler_plugin(...).

@restingbull restingbull merged commit f121400 into bazelbuild:master Nov 15, 2020
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