Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD Files Not Generated #6

Open
paulhundal opened this issue Apr 24, 2024 · 1 comment
Open

BUILD Files Not Generated #6

paulhundal opened this issue Apr 24, 2024 · 1 comment

Comments

@paulhundal
Copy link

Repository: https://github.com/federicoiosue/Omni-Notes -> Using this OSS project as a way to test migration from Gradle -> Bazel.

Problem After running ./gradlew omniNotes:migrateToBazel --no-configure-on-demand no bazel files generated, even with task success.

OUTPUT:

Omni-Notes develop * ./gradlew omniNotes:migrateToBazel --no-configure-on-demand

> Configure project :omniNotes
BUILD SUCCESSFUL in 486ms
1 actionable task: 1 up-to-date

Change to root build.gradle

classpath "io.morfly.airin:airin-gradle-android:0.5.2"
...

apply plugin: "io.morfly.airin.android"
airin {
    targets += [":omniNotes"]
}

Expected

the task generates a set of Bazel files for a migration target, all its dependencies and the root module. Consequently, all of them can be built with Bazel.

@Morfly
Copy link
Owner

Morfly commented Apr 26, 2024

Hi @paulhundal ,
Thank you for reaching out!

Please make sure to register Module/Feature components in the airin block. The components handle the generation of BUILD files.

Airin ships with a couple of default components for Android modules. However, in many cases, you would be required to create your own components to define a logic that generates Bazel scripts needed for your project. The components provide an API that helps you to get details about your Gradle modules. Moreover, they provide a DSL that helps you to generate corresponding Bazel scripts based on this data.

Please refer to this video for a live demo to learn more: https://youtu.be/xkGcrLn2yIs?si=guCn1Q3CfSDtX9jF&t=1608
There is a live demo at 26:48 but the rest of the video could be also helpful for more context about components.
Let me know if you have any questions.

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

No branches or pull requests

2 participants