Skip to content

Provide --gradle option for using a custom Gradle executable #5550

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

Closed
FestplattenSchnitzel opened this issue Jul 13, 2021 · 4 comments
Closed
Labels

Comments

@FestplattenSchnitzel
Copy link

Is your feature request related to a problem? Please describe.

Apps can't be build for F-Droid directly with the CLI (ns build android) at the moment. This is due to the fact, that F-Droid 1) uses a custom Gradle executable and 2) deletes all additional Gradle wrappers before starting the build process.

Describe the solution you'd like

An --gradle option (or similarly named) for the CLI would be great. It should provide the ability to use a custom Gradle executable instead of the one from the {N} Gradle wrapper.

E.g. ns build android --gradle /usr/bin/gradle

Describe alternatives you've considered

The current workaround is:

  • ns prepare android
  • cd platforms/android/app
  • gradle "assembleRelease" "-PappPath=app" "-PappResourcesPath=app/resources" (or similar)

However some [Webpack|JS] features like AOT or uglify might not work.

Additional context

Feel free to ask for more information at https://gitlab.com/fdroid/fdroiddata/-/issues/2309.

CC @farfromrefug

@rigor789
Copy link
Member

Would these apps need building for both regular android and F-Droid, or should we move this to the nativescript.config.(ts|js) where it's persistent (ie. doesn't require passing an extra flag every time)?

PS. The proposed feature of passing CLI args from the config ( from #5296 ) is something we'll be looking at very soon, just slightly a different direction to utilize the config instead of a json file...

@FestplattenSchnitzel
Copy link
Author

I think you got me wrong. F-Droid is not a custom Android variant, it's "just" an app store that does only contain free software apps for "regular" android (and therefore builds everything from source).

So there is no persistence needed, since the app developer (or someone who clones & builds from the repository) might build with the Gradle wrapper shipped with the {N} CLI but F-Droid or another user might want to use a Gradle executable installed in a custom location.

Nevertheless: thank you for your fast reply! 🚀

@farfromrefug
Copy link
Contributor

farfromrefug commented Feb 15, 2022

@FestplattenSchnitzel i created and tested the PR #5628
@FestplattenSchnitzel it has been merged! it will in next version as --gradlePath

@FestplattenSchnitzel
Copy link
Author

Thank you very much @farfromrefug!

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

No branches or pull requests

4 participants