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

Sources are not visible in Android Studio #73

Open
MatrixDev opened this issue Sep 29, 2021 · 2 comments
Open

Sources are not visible in Android Studio #73

MatrixDev opened this issue Sep 29, 2021 · 2 comments

Comments

@MatrixDev
Copy link

MatrixDev commented Sep 29, 2021

Sources are not added to Android Studio sourceSet when Rust library is outside of the Android Studio (and on most cross-platform projects it most probably will be). In result it is not possible to edit any file (as you just can't find any) in the IDE.

It would be nice to have something similar to the externalNativeBuild & CMake - it adds all sources to the sourceSet and they are visible from both Project and Android tabs.

@ncalexan
Copy link
Member

Many moons ago, when I was trying to get "out of project" source files working for Firefox for Android, I concluded that Gradle/Android Studio just wasn't flexible enough to support a random project root containing source files. But that was 5+ years ago! I would gladly take patches adding support for configuring source sets with Rust code. In a perfect world these would follow on with the finer-grained support for build types and product flavors discussed in other tickets like #68.

Even a link to an example project that arranges the source sets "by hand" would be helpful: it could provide a model for how to do this inside the plugin itself. Thanks for the suggestion!

@MatrixDev
Copy link
Author

@ncalexan previously I was just adding root cargo folder to the jni sourceSet and it was working. But with the release of the AS Arctic Fox and its AGP they've deprecated jni sourceSet and it now does nothing.

I'm not that good in developing gradle plugins and have opened bugs here and for AGP. AGP team has almost instantly rejected it as Rust is not a priority at this time.... I had hopes you will have some ideas.

IMHO Rust is great and all but tooling... is a very high wall to climb just to make it work properly :(

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