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

Implement SAF provider. #76

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

gilbsgilbs
Copy link

@gilbsgilbs gilbsgilbs commented Jul 13, 2020

Late night project πŸŒƒ 😞 …

Changelog:

  • Implement a SAF Document provider. This allows third party apps to access files through RClone (e.g. password manager, Android's stock file manager).
    • ℹ️ File download was implemented using rclone cat command.
    • ℹ️ File upload was implemented using rclone rcat command.
  • Rework build scripts so that project builds in Android Studio directly after git clone, without having to run specific gradle tasks under a specific set of environment variables.
  • Fix other issues I had prior building (especially google-services.json being missing).
  • Make rclone the unique source of truth for remote names (rather than refreshing views everywhere across the app).
  • Other refactoring.

Hope you'll enjoy it.

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2020

CLA assistant check
All committers have signed the CLA.

- Update android SDK and gradlewrapper.
- Make rclone build automatically when building the app.
  Previously, rcx would happily build without the SO which would make it
  crash at runtime and be surprising to the developer.
- Fix build when google-services.json is missing. We now just check if
  the "google-services.json" exists to know if we want to include
  firebase and gms.
This is a major rework of how remote names are handled.
Also update NDK in CI.
@x0b
Copy link
Owner

x0b commented Jul 14, 2020

Oh man, I was going to release my attempt this week to the alpha testers πŸ˜€. So, here's the new plan:

  1. I'm going to push my current workspace more often so that this doesn't happen any more.
  2. I'm going ahead with releasing the alpha version
  3. Then, we look into whether your version should replace it, or if we can merge the two ideas. Also, we'll see whether we can merge your other changes right away.

However, I'm currently really distracted because of things that happened in my personal life, but I'm trying to keep things going.

@gilbsgilbs
Copy link
Author

Oh, that's my bad, I should have commented on the issue first to check if there were any progress. But I think there's a lot of improvements we can pick from this PR anyways, especially the rework on how rclone is built, the renames rework, and maybe pick some ideas from my SAF implementation.

@x0b
Copy link
Owner

x0b commented Jul 15, 2020

Yes, from taking a quick look:

  • 5e4781b: Looks good, although we cannot upgrade to API 30 until January, according to Google documentation
  • 7904a6e / e54ed51: Good (some changes required)
  • SAF: I'll have to look at this later

@gilbsgilbs
Copy link
Author

gilbsgilbs commented Jul 15, 2020

5e4781b: Looks good, although we cannot upgrade to API 30 until January, according to Google documentation

Yup sorry, fixed. Android Studio wasn't very clear about it.

I also added some migration code so that users will keep their renamed remotes.
Edit: doesn't seem ok with remote names containing special characters in fact. Although properly listed when invoking "rclone config", rclone refuses to use them with other commands. I'll have to rework on this.
Edit: Done

Most importantly, we defer the build of rclone just before the assemble
stage of the main app, so that Android Studio displays a convenient
clickable error message that allows to install the proper NDK version
directly from the SDK manager.

This commit also de-duplicates rclone build jobs for earch arch.
@gilbsgilbs
Copy link
Author

Hey, I'm just passing by on this PR to update RClone and build tools. I've been using my fork for a while now and didn't notice any issue.

No urge to review though if you still have more important things to do πŸ˜‰ . If you need help for something, do not hesitate. I'd love to help you get this app on F-Droid.

Take care.

This commit updates build tools, android gradle plugin and RClone to
their latest version.

Also, the RClone build recipe now creates a go module instead of git.
his will make sure dependencies are pinned to the version expected by
RClone.
@x0b
Copy link
Owner

x0b commented Aug 17, 2020

Sorry, I'm currently still very caught up with personal stuff. I'll try to get the 1.12 preview out this week and then look into your PR.

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.

None yet

3 participants